Paolo Bonzini <pbonz...@redhat.com> writes:
> All constructs introduced by newer versions of Rust have been removed. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > meson.build | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meson.build b/meson.build > index 175b8d82228..0e279d245b4 100644 > --- a/meson.build > +++ b/meson.build > @@ -76,11 +76,11 @@ if not get_option('rust').disabled() and > add_languages('rust', required: get_opt > and add_languages('rust', required: get_option('rust'), native: true) > rustc = meson.get_compiler('rust') > have_rust = true > - if rustc.version().version_compare('<1.80.0') > + if rustc.version().version_compare('<1.63.0') In my Ubuntu 22.04 environment (rustc 1.76.0 and bindgen 0.59.1 from apt) the feature `proc_macro_byte_character` is not yet stablized but used in proc-macro2. Downgrading proc-macro2 to 1.0.79 [1] and syn to 2.0.58 fixes that issue for me. [1] https://github.com/drmingdrmer/openraft/commit/d496b6db4c6128d33f0f211165c08a7925cf20f7 Here're my changes: diff --git a/subprojects/proc-macro2-1-rs.wrap b/subprojects/proc-macro2-1-rs.wrap index 7053e2c013..d5713b45d7 100644 --- a/subprojects/proc-macro2-1-rs.wrap +++ b/subprojects/proc-macro2-1-rs.wrap @@ -1,7 +1,7 @@ [wrap-file] -directory = proc-macro2-1.0.84 -source_url = https://crates.io/api/v1/crates/proc-macro2/1.0.84/download -source_filename = proc-macro2-1.0.84.0.tar.gz -source_hash = ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6 +directory = proc-macro2-1.0.79 +source_url = https://crates.io/api/v1/crates/proc-macro2/1.0.79/download +source_filename = proc-macro2-1.0.79.0.tar.gz +source_hash = e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e #method = cargo patch_directory = proc-macro2-1-rs diff --git a/subprojects/syn-2-rs.wrap b/subprojects/syn-2-rs.wrap index 13ffdac3c3..9d413a0c57 100644 --- a/subprojects/syn-2-rs.wrap +++ b/subprojects/syn-2-rs.wrap @@ -1,7 +1,7 @@ [wrap-file] -directory = syn-2.0.66 -source_url = https://crates.io/api/v1/crates/syn/2.0.66/download -source_filename = syn-2.0.66.0.tar.gz -source_hash = c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5 +directory = syn-2.0.58 +source_url = https://crates.io/api/v1/crates/syn/2.0.58/download +source_filename = syn-2.0.58.0.tar.gz +source_hash = 44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687 #method = cargo patch_directory = syn-2-rs -- Best Regards Junjie Mao > if get_option('rust').enabled() > - error('rustc version ' + rustc.version() + ' is unsupported: Please > upgrade to at least 1.80.0') > + error('rustc version ' + rustc.version() + ' is unsupported: Please > upgrade to at least 1.63.0') > else > - warning('rustc version ' + rustc.version() + ' is unsupported: > Disabling Rust compilation. Please upgrade to at least 1.80.0 to use Rust.') > + warning('rustc version ' + rustc.version() + ' is unsupported: > Disabling Rust compilation. Please upgrade to at least 1.63.0 to use Rust.') > have_rust = false > endif > endif