Update all dependencies #2
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/all"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
v1->v4v3->v5v2->v51->20.2->0.30.13->0.1611->171.0->2.0Release Notes
actions/cache (actions/cache)
v4Compare Source
v3Compare Source
v2Compare Source
actions/checkout (actions/checkout)
v5Compare Source
v4Compare Source
url-helper.tsnow leverages well-known environment variables by @jww3 in https://github.com/actions/checkout/pull/1941isGhesby @jww3 in https://github.com/actions/checkout/pull/1946bitflags/bitflags (bitflags)
v2.10.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.9.4...2.10.0
v2.9.4Compare Source
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.9.3...2.9.4
v2.9.3Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.9.2...2.9.3
v2.9.2Compare Source
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.9.1...2.9.2
v2.9.1Compare Source
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.9.0...2.9.1
v2.9.0Compare Source
What's Changed
Flagstrait: addclear(&mut self)method by @wysiwys in https://github.com/bitflags/bitflags/pull/437Full Changelog: https://github.com/bitflags/bitflags/compare/2.8.0...2.9.0
v2.8.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.7.0...2.8.0
v2.7.0Compare Source
What's Changed
clippy::doc_lazy_continuationlints by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/414truncate(&mut self)method to unset unknown bits by @wysiwys in https://github.com/bitflags/bitflags/pull/428New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.6.0...2.7.0
v2.6.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.5.0...2.6.0
v2.5.0Compare Source
What's Changed
DebugforFlag<B>by @tgross35 in https://github.com/bitflags/bitflags/pull/398New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.4.2...2.5.0
v2.4.2Compare Source
What's Changed
unused_tuple_struct_fieldslint by @dtolnay in https://github.com/bitflags/bitflags/pull/393local_inner_macrosby @dtolnay in https://github.com/bitflags/bitflags/pull/392New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2
v2.4.1Compare Source
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.4.0...2.4.1
v2.4.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.3.3...2.4.0
v2.3.3Compare Source
Changes to
-=The
-=operator was incorrectly changed to truncate bits that didn't correspond to valid flags in2.3.0. This hasbeen fixed up so it once again behaves the same as
-anddifference.Changes to
!The
!operator previously calledSelf::from_bits_truncate, which would truncate any bits that only partiallyoverlapped with a valid flag. It will now use
bits & Self::all().bits(), so any bits that overlap any bitsspecified by any flag will be respected. This is unlikely to have any practical implications, but enables defining
a flag like
const ALL = !0as a way to signal that any bit pattern is a known set of flags.Changes to formatting
Zero-valued flags will never be printed. You'll either get
0x0for empty flags using debug formatting, or theset of flags with zero-valued flags omitted for others.
Composite flags will no longer be redundantly printed if there are extra bits to print at the end that don't correspond
to a valid flag.
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3
v2.3.2Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.3.1...2.3.2
v2.3.1Compare Source
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.3.0...2.3.1
v2.3.0Compare Source
Major changes
BitFlagstrait deprecated in favor ofFlagstraitThis release introduces the
Flagstrait and deprecates theBitFlagstrait. These two traits are semver compatible so if you have public API code depending onBitFlagsyou can move toFlagswithout breaking end-users. This is possible because theBitFlagstrait was never publicly implementable, so it now carriesFlagsas a supertrait. All implementations ofFlagsadditionally implementBitFlags.The
Flagstrait is a publicly implementable version of the oldBitFlagstrait. The originalBitFlagstrait carried some macro baggage that made it difficult to implement, so a newFlagstrait has been introduced as the One True Trait for interacting with flags types generically. See the themacro_freeandcustom_deriveexamples for more details.Bitstrait publicly exposedThe
Bitstrait for the underlying storage of flags values is also now publicly implementable. This lets you define your own exotic backing storage for flags. See thecustom_bits_typeexample for more details.What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.2.1...2.3.0
v2.2.1Compare Source
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.2.0...2.2.1
v2.2.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.1.0...2.2.0
v2.1.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0
v2.0.2Compare Source
What's Changed
Full Changelog: https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2
v2.0.1Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1
v2.0.0Compare Source
Major changes
This release includes some major changes over
1.x. If you usebitflags!types in your public API then upgrading this library may cause breakage in your downstream users.⚠️ Serialization
You'll need to add the
serdeCargo feature in order to#[derive(Serialize, Deserialize)]on your generated flags types:where
Tis the underlying bits type you're using, such asu32.The default serialization format with
serdehas changed if you#[derive(Serialize, Deserialize)]on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits type for compact formats.To keep the old format, see the https://github.com/KodrAus/bitflags-serde-legacy library.
⚠️ Traits
Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself:
⚠️ Methods
The unsafe
from_bits_uncheckedmethod is now a safefrom_bits_retainmethod.You can add the following method to your generated types to keep them compatible:
where
Tis the underlying bits type you're using, such asu32.⚠️
.bitsfieldYou can now use the
.bits()method instead of the old.bits.The representation of generated flags types has changed from a struct with the single field
bitsto a newtype.What's Changed
Okby @konsumlamm in https://github.com/bitflags/bitflags/pull/266Debugimplementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268New Contributors
Full Changelog: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0
rust-random/getrandom (getrandom)
v0.3.4Compare Source
Major change to
wasm_jsbackendNow, when the
wasm_jsfeature is enabled, thewasm_jsbackend will be usedby default. Users of
wasm32-unknown-unknowntargeting JavaScript environmentslike the Web and Node.js will no longer need to specify:
in
RUSTFLAGSfor the crate to compile. They can now simple enable a feature.Note: this should not affect non-JS users of the
wasm32-unknown-unknowntarget. Using
--cfg getrandom_backendwill still override the source ofrandomness even if the
wasm_jsfeature is enabled. This includes--cfg getrandom_backend=customand--cfg getrandom_backend=unsupported.For more information, see the discussions in #671, #675, and #730.
Added
unsupportedopt-in backend #667windows_legacyopt-in backend #724Changed
linux_rawopt-in backend on ARM targets #688getrandomsyscall on all RISC-V Linux targets #699wasidependency withwasip2#721wasm_jsbackend by default if thewasm_jsfeature is enabled #730Removed
rustc-dep-of-stdcrate feature #694v0.3.3Compare Source
Changed
compile_error!s #639Fixed
v0.3.2Compare Source
Added
efi_rngopt-in backend #570linux_rawopt-in backend #572.cargo/config.tomlexample in the crate-level docs #591getrandom_test_linux_without_fallbackconfiguration flag to test that file fallbackis not triggered in the
linux_android_with_fallbackbackend #605*-linux-nonetargets #618Changed
wasidependency to v0.14 #594#[inline]attribute to the inner functions #596dlsymon MUSL targets in thelinux_android_with_fallbackbackend #602linux_android.rsand usegetrandom.rsinstead #603RtlGenRandomon Windows targets when compiling with pre-1.78 Rust #610Errortype #614windows-targetsdependency and use [raw-dylib][raw-dylib] directly #627Removed
Error::INTERNAL_STARTandError::CUSTOM_STARTassociated constants #614v0.3.1Compare Source
Fixed
v0.3.0Compare Source
Breaking Changes
Changed
getrandomandgetrandom_uninitfunctions tofillandfill_uninitrespectively #532Removed
wasm32-wasitarget support (usewasm32-wasip1orwasm32-wasip2instead) #499linux_disable_fallback,rdrand,js,test-in-browser, andcustomcrate featuresin favor of configuration flags #504
register_custom_getrandom!macro #504From<NonZeroU32>forErrorandError::codemethod #507Errorconstants #562Changed
ProcessPrngon Windows 10 and up, and useRtlGenRandomon older Windows versions #415strerror_rfor retrieving error code descriptions #440usizeis the native word size in therdrandbackend #442errnowhenlibcdid not indicate error on Solaris #448libpthread's mutex tofutexon Linux and tonanosleep-based wait loopon other targets in the
use_filebackend #490EAGAINwhile polling/dev/randomon Linux #522wasm_jsbackend(bumps minimum supported Node.js version to v19) #557
js_namespacein thewasm_jsbackend #559Added
wasm32-wasip1andwasm32-wasip2support #499getrandom_backendconfiguration flag for selection of opt-in backends #504Error::new_custommethod #507rndropt-in backend #512u32andu64functions for generating random values of the respective type #544wasm32v1-nonesupport in thewasm_jsbackend #560wasm_jscrate feature which allows users to enable thewasm_jsopt-in backend #574Fixed
KERN_ARND#555rust-lang/hashbrown (hashbrown)
v0.16.0Compare Source
Changed
DefaultHashBuilderwith a newtype wrapper aroundfoldhashinsteadof re-exporting it directly.
v0.15.5Compare Source
Added
Entry::or_default_entryandEntry::or_insert_entry.Changed
#[cold]v0.15.4Compare Source
Changed
std.v0.15.3Added
Changed
match_empty(#607)ExtractIfdata structures (#616)hash_map::EntryRefinsertion methodsK: From<&Q>to &Q:Into<K>(#611)rustc_iter(#605)allocator-api2/nightlyfeature is no longer enabled byhashbrown/nightly(#606)v0.15.2Added
const fnconstructors asrustc_const_stable_indirectwhen built aspart of the standard library. (#586)
v0.15.1Compare Source
This release removes the
borshfeature introduced in 0.15.0 because it wasfound to be incorrectly implemented. Users should use the
hashbrownfeature ofthe
borshcrate instead which provides the same trait implementations.v0.15.0Compare Source
This release was yanked due to a broken implementation of the
borshfeature.This update contains breaking changes that remove the
rawAPI with the hope ofcentralising on the
HashTableAPI in the future. You can follow the discussionand progress in #545 to discuss features you think should be added to this API
that were previously only possible on the
rawAPI.Added
borshfeature withBorshSerializeandBorshDeserializeimpls. (#525)Assignimpls forHashSetoperators. (#529)Defaultimpls for iterator types. (#542)HashTable::iter_hash{,_mut}methods. (#549)Hash{Table,Map,Set}::allocation_sizemethods. (#553)DebugandFusedIteratorfor allHashTableiterators. (#561)Iterator::foldfor allHashTableiterators. (#561)Changed
hash_set::VacantEntry::insertto returnOccupiedEntry. (#495)hash_set::Difference::size_hintlower-bound. (#530)HashSet::is_disjointperformance. (#531)equivalentfeature is now enabled by default. (#532)HashSetoperators now return a set with the same allocator. (#529)ahashfeature has been renamed todefault-hasher. (#533)Hash{Map,Set}::insert_unique_uncheckedis now unsafe. (#556)get_many_mutand related methods was changed. (#562)Fixed
Removed
raw-entryfeature, to be eventually removed. (#534, #555)rawfeature is removed;in the future, all code should be using the
HashTableAPI instead. (#531, #546)rykvfeature was removed; this is now provided by therykvcrate instead. (#554)HashSet::get_or_insert_ownedwas removed in favor ofget_or_insert_with. (#555)v0.14.5Compare Source
Fixed
clone_from_impl. (#511)v0.14.4Compare Source
This release was yanked due to a breaking change.
v0.14.3Compare Source
Added
foldimplementation of iterators. (#480)Fixed
ptr::invalid_muton nightly. (#481)v0.14.2Compare Source
Added
HashTabletype which provides a low-level but safe API with explicit hashing. (#466)Fixed
v0.14.1Compare Source
Added
HashMaps that use a custom allocator. (#449)Changed
Equivalenttrait from theequivalentcrate. (#442)Clonerequirement from custom allocators. (#468)Fixed
v0.14.0Compare Source
Added
allocator-api2cratefor interfacing with custom allocators on stable. (#417)
Equivalenttrait to look up values withoutBorrow. (#345)Hash{Map,Set}::raw_table_mutis added which returns a mutable reference. (#404)clearon empty tables. (#428)Changed
DrainFilter(drain_filter) has been renamed toExtractIfand no longer drops remainingelements when the iterator is dropped. #(374)
{Map,Set}::raw_tablenow returns an immutable reference. (#404)VacantEntryandOccupiedEntrynow use the default hasher if none isspecified in generics. (#389)
RawTable::data_startnow returns aNonNullto matchRawTable::data_end. (#387)RawIter::{reflect_insert, reflect_remove}are now unsafe. (#429)RawTable::find_potentialis renamed tofind_or_find_insert_slotand returns anInsertSlot. (#429)RawTable::removenow also returns anInsertSlot. (#429)InsertSlotcan be used to insert an element withRawTable::insert_in_slot. (#429)RawIterHashno longer has a lifetime tied to that of theRawTable. (#427)HashSet::raw_tablehave been relaxed to not requireEq + Hash. (#423)EntryRef::and_replace_entry_withandOccupiedEntryRef::replace_entry_withwere changed to give a
&Kinstead of a&Qto the closure.Removed
bumpaloas an allocator with custom wrapper.Use
allocator-api2feature inbumpaloto use it as an allocatorfor
hashbrowncollections. (#417)kkawakam/rustyline (rustyline)
v17.0.2: 17.0.2Compare Source
Fix partial refresh #899, #897
Full Changelog: https://github.com/kkawakam/rustyline/compare/v17.0.1...v17.0.2
v17.0.1: 17.0.1Compare Source
Full Changelog: https://github.com/kkawakam/rustyline/compare/v17.0.0...17.0.1
v17.0.0: 17.0.0Compare Source
What's Changed
Full Changelog: https://github.com/kkawakam/rustyline/compare/v16.0.0...v17.0.0
v16.0.0: 16.0.0Compare Source
What's Changed
Full Changelog: https://github.com/kkawakam/rustyline/compare/v15.0.0...v16.0.0
v15.0.0: 15.0.0Compare Source
What's Changed
Full Changelog: https://github.com/kkawakam/rustyline/compare/v14.0.0...v15.0.0
v14.0.0: 14.0.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/kkawakam/rustyline/compare/v13.0.0...v14.0.0
v13.0.0: 13.0.0Compare Source
What's Changed
HistoryHinter::default()andHistoryHinter::new()by @segeljakt in https://github.com/kkawakam/rustyline/pull/710CandidateforRc<str>by @fsktom in https://github.com/kkawakam/rustyline/pull/721New Contributors
Full Changelog: https://github.com/kkawakam/rustyline/compare/v12.0.0...v12.0.1
v12.0.0: 12.0.0Compare Source
What's Changed
homecrate #698Full Changelog: https://github.com/kkawakam/rustyline/compare/v11.0.0...v12.0.0
dtolnay/syn (syn)
v2.0.110Compare Source
syn::ext::IdentExt::unrawavailable without "parsing" feature (#1940)syn::Metafollowed by=>(#1944)v2.0.109Compare Source
v2.0.108Compare Source
v2.0.107Compare Source
v2.0.106Compare Source
~constsyntax with[const]conditionally const syntax in trait bounds (#1896, https://github.com/rust-lang/rust/pull/139858)v2.0.105Compare Source
impl !T {}(#1881, https://github.com/rust-lang/rust/pull/144386)v2.0.104Compare Source
v2.0.103Compare Source
v2.0.102Compare Source
v2.0.101Compare Source
v2.0.100Compare Source
Visit::visit_token_stream,VisitMut::visit_token_stream_mut,Fold::fold_token_streamfor processing TokenStream during syntax tree traversals (#1852)v2.0.99Compare Source
v2.0.98Compare Source
ParseStream::callandPunctuatedparsers (#1847)v2.0.97Compare Source
v2.0.96Compare Source
v2.0.95Compare Source
v2.0.94Compare Source
v2.0.93Compare Source
x as T <<= y(#1804),break as T(#1805),match x { _ if .. => {} }(#1807)|| -> T 'a: {}(#1806),if break x {}(#1808, #1810)v2.0.92Compare Source
v2.0.91Compare Source
Vec<Arm>usingparse_quote!(#1796, #1797)v2.0.90Compare Source
(#[attr] thing).field(#1785)(thing.field)()andthing.0()(#1786)v2.0.89Compare Source
v2.0.88Compare Source
parse_str(#1783)v2.0.87Compare Source
Cursor::any_group(#1777)Expr::peek(#1778)v2.0.86Compare Source
parse_quote!to produce Vec<Attribute> (#1775)v2.0.85Compare Source
v2.0.84Compare Source
impl Sized + use<Self>(#1772)v2.0.83Compare Source
v2.0.82Compare Source
Parseimpls for PreciseCapture and CapturedParam (#1757, #1758)unsafeattributes (#1759)v2.0.81Compare Source
impl Trait + use<'a, T>(#1752, #1753, #1754)v2.0.80Compare Source
Expr::RawAddr(#1743)v2.0.79Compare Source
useitems containing absolute paths (#1742)v2.0.78Compare Source
v2.0.77Compare Source
Expr::Tuplein non-"full" mode (#1727)v2.0.76Compare Source
becomekeyword is followed by an expression (#1725)v2.0.75Compare Source
v2.0.74Compare Source
Genericsiterator methods (#1719)v2.0.73Compare Source
Fields::membersiterator (#1716, thanks @Fancyflame)v2.0.72Compare Source
use<'a, T>precise capturing bounds (#1707, thanks @compiler-errors)v2.0.71Compare Source
v2.0.70Compare Source
v2.0.69Compare Source
Punctuated::getandget_mut(#1693)v2.0.68Compare Source
parse_quote!parses invalid syntax (#1690, thanks @stepancheg)GroupandLifetime(#1687)v2.0.67Compare Source
LitCStrin ParseStream::peek (#1682)v2.0.66Compare Source
v2.0.65Compare Source
Foldto compile faster (#1666, #1667, #1668)v2.0.64Compare Source
catch_unwind(#1646)breakandreturnin loop headers (#1656)v2.0.63Compare Source
v2.0.62Compare Source
v2.0.61Compare Source
v2.0.60Compare Source
peek(#1625)v2.0.59Compare Source
c"…"andcr"…"C-string literal syntax asLit::CStr(#1502)v2.0.58Compare Source
$incustom_punctuation!macro (#1611)v2.0.57Compare Source
quotewhen built with default-features disabled and the "proc-macro" feature enabled (#1608, thanks @BD103)v2.0.56Compare Source
v2.0.55Compare Source
v2.0.54Compare Source
custom_keyword!with syn's "printing" feature disabled (#1602)v2.0.53Compare Source
v2.0.52Compare Source
v2.0.51Compare Source
v2.0.50Compare Source
v2.0.49Compare Source
LitStr::parse(#1590)v2.0.48Compare Source
else(#1578)v2.0.47Compare Source
v2.0.46Compare Source
v2.0.45Compare Source
DeriveInputasExpr::Verbatimin non-"full" mode, instead of error (#1513)PatTypewithparse_quote!(#1573)v2.0.44Compare Source
v2.0.43Compare Source
v2.0.42Compare Source
v2.0.41Compare Source
parse_quote!(#1548)v2.0.40Compare Source
v2.0.39Compare Source
v2.0.38Compare Source
boolas a custom keyword (#1518, thanks @Vanille-N)v2.0.37Compare Source
v2.0.36Compare Source
--generate-link-to-definitiondocumentation builds (#1514)v2.0.35Compare Source
Token!macro (#1510, #1512)v2.0.34Compare Source
v2.0.33Compare Source
(/*ERROR*/)placeholder that rustc uses for macros that fail to expandv2.0.32Compare Source
Path::require_identaccessor (#1496, thanks @Fancyflame)v2.0.31Compare Source
v2.0.30Compare Source
v2.0.29Compare Source
v2.0.28Compare Source
v2.0.27Compare Source
v2.0.26Compare Source
SpannedforQSelf(#1465)v2.0.25Compare Source
v2.0.24Compare Source
v2.0.23Compare Source
where [(); { T::COUNT }]:in non-"full" mode (#1478)v2.0.22Compare Source
c"…"c-string literals (tracking issue: https://github.com/rust-lang/rust/issues/105723)v2.0.21Compare Source
LitByteStr::valuein the case of a cooked byte string literal containing form feed or vertical tab characters following an escaped newline (#1474)v2.0.20Compare Source
v2.0.19Compare Source
v2.0.18Compare Source
v2.0.17Compare Source
v2.0.16Compare Source
builtin #syntax as Expr::Verbatim (https://github.com/rust-lang/rust/issues/110680, #1454)v2.0.15Compare Source
Type::Tupleof length 1 prints as a tuple even if trailing comma is not provided in the Punctuated (#1444, thanks @Fancyflame)v2.0.14Compare Source
v2.0.13Compare Source
v2.0.12Compare Source
compile_error!by absolute path in token stream produced by syn::Error::to_compile_error (#1431, thanks @smoelius)v2.0.11Compare Source
v2.0.10Compare Source
v2.0.9Compare Source
typeitems in an extern block, trait, or module from being markeddefaultimpl T { fn f(&self); }— omitted function bodies are allowed by TraitItemFn, but inimplblocks this syntax is now parsed as ImplItem::Verbatim rather than ImplItem::Fnv2.0.8Compare Source
trykeyword as 2015-edition identifier in definition of try macro (#1422)v2.0.7Compare Source
mut selfinside of Type::BareFnv2.0.6Compare Source
v2.0.5Compare Source
ExprMacrodata structure even whenfeatures="full"is not used (#1417)v2.0.4Compare Source
v2.0.3Compare Source
ExprGroupdata structure even whenfeatures="full"is not used (#1412)v2.0.2Compare Source
v2.0.1Compare Source
v2.0.0Compare Source
This release contains a batch of syntax tree improvements to incorporate ongoing Rust language development from the past 3.5 years since syn 1.
It never seems like an ideal time to finalize a syntax tree design, considering the frankly alarming number of syntax-disrupting language features currently in flight: keyword generics, restrictions, capabilities and contexts, conditional constness, new varieties of literals, dyn revamp such as explicitly dyn-safe traits and dyn-star, expression syntax in various phases of being added or being torn out (const blocks, try blocks, raw references), auto traits and negative impls, generalizations to higher rank trait bounds, async closures and static async trait methods, postfix keywords, pattern types, return type notation, unsafe attributes, …
The plan continues to be the same as laid out originally in the 1.0.0 release announcement:
If anything, the takeaway from the 3.5 year longevity of syn 1 is that this period was tamer from a language development perspective than anticipated, but that is unlikely to last and I think around 24 months is still the correct cadence to expect between releases going forward.
[API documentation for 2.0]
Breaking changes
Expressions
Support for
box exprsyntax has been deleted, as it has been deleted recently from rustc.Support for type ascription syntax
expr: Typein expression position has been deleted.Support for unstable
&raw const exprraw-pointer reference syntax has been deleted.The representation of generic arguments has been unified between method calls and non-method paths into a single
GenericArgumenttype, which supersedes the previousGenericMethodArgumentandMethodTurbofish.Generic arguments now distinguish between associated types (
AssocType) and associated constant values (AssocConst). Previously these would be parsed ambiguously asBinding.The binary assignment operators in
BinOphave been renamed to align with the naming used by the standard library'score::opsmodule's traits. For exampleBinOp::AddEqis now calledBinOp::AddAssign.Expr::Structstruct construction expressions now support structs which are a variant of an enum associated type of a trait, as in<Type as Trait>::Assoc::Variant { ... }, which has recently been added to Rust.Expr::Rangenow follows thestartandendnaming used by the standard library'sRangeBoundstrait, rather thanfrom/toorlo/hi.Expr::AssignOphas been merged intoExpr::Binary, which now represents both non-assignment and assignment binary operators.Stricter parsing of ranges. None of the following are valid expressions, but were previously accepted by syn:
..=,lo..=,...,...hi,lo...,lo...hi.Expr::Closurenow includes a representation forfor<...>lifetimes.Statements
Variants
Stmt::Expr(tail-position expression without trailing semicolon) andStmt::Semi(non-tail expression with trailing semicolon) have been combined intoStmt::Exprwith the optional semicolon represented byOption<Token![;]>.The syntax tree for
Stmt::Localhas been extended to handlelet/elsesyntax.Macros in statement position are now uniformly parsed as
Stmt::Macro. Previously these would be disambiguated toStmt::Item, although it was ambiguous whether a macro in statement position would expand to an item (likethread_local! { ... }) vs an expression (likeprintln! { ... }).Patterns
Pattern parsing for all the different syntactic positions in which patterns are allowed has been split into
Pat::parse_single(for function- and closure-argument position, where top-level|is not allowed),Pat::parse_multi(where|is allowed) andPat::parse_multi_with_leading_vert(for the pattern of match arms, which allow an optional leading|). Previously only a singleparsebehavior was supported and behaved like the newparse_single.The
Patsyntax tree now shares more common data structures with theExprsyntax tree where possible, such as for literals, paths, macros, and ranges in pattern position.Parsing of struct field patterns does a better job rejecting bogus syntax such as
Struct { 0 asdf }andStruct { ref mut 0: asdf }, which were previously incorrectly accepted.Pat::Rangenow supports one-sided ranges by representing the start and end bound of the range byOption<Expr>.Pat::Structkeeps track of attributes on the optional.."rest" part of the pattern, as inlet Struct { x, #[cfg(any())] .. } = _;.Parsing unary negation now enforces that only literal patterns can be unarily negated. For example
-self::CONSTand-const { 0i32 }are not valid syntax in pattern position.Pat::TupleStructno longer wraps a value of typePatTuplebut represents that information in its fields directly.A single parenthesized pattern without trailing comma inside the parentheses is no longer considered a
Pat::Tuple, it will be parsed asPat::Paren.One-sided range patterns are no longer allowed inside of slice patterns.
[lo..]and[..=hi]are not considered valid pattern syntax by Rust.Items
Typed
selfin a method signature, such asself: Pin<&mut Self>, will now be parsed asFnArg::Receiver. This meansself, whether with or without an explicit type, is always treated as aReceiver. Previously only the&selfand&mut selfshorthand receivers were parsed asReceiver.TraitItem::MethodandImplItem::Methodhave been renamed toTraitItem::FnandImplItem::Fn, as they do not necessarily represent methods if the function signature contains noself.Item::Macro2has been deleted as "macros 2.0" syntax is no longer considered on track for stabilization.Various item kinds now hold
Genericswhich didn't used to have them.The variadic argument of an extern function signature can now be given an optional parameter name.
WherePredicate::Eqis no longer supported.Visibility::Crateis no longer supported. This syntax has been removed from rustc.Public visibility is now represented by a single
Token![pub]token rather than the oldVisPublicstruct.LifetimeDefis now calledLifetimeParam. This name makes more sense in the context of theGenericParamenum (which also includesTypeParamandConstParam), and is the name that the Rust Reference uses.Modules and extern blocks (
Item::ModandItem::ForeignMod) can now be markedunsafe.Attributes
The syntax tree for
Attributehas been redesigned. The new API better accommodates attributes which mix structured and unstructured content at different levels of nesting.AttributeArgshas been removed. UsePunctuated<Meta, Token![,]>.For parsing attribute contents,
parse_meta()is superseded by a new parsing library calledsyn::meta, and theparse_nested_metamethod onAttribute.Tokens
In string literals, the handling of non-ASCII whitespace after trailing
\now matches what is implemented by rustc. Space, horizontal tab, line feed, and carriage return are the only 4 whitespace characters which are supposed to be stripped from the beginning of the next line.The delimiter tokens
syn::token::Paren,Bracket, andBracenow store 2 spans (the open and close punctuation separately) rather than just 1. Use.join()to obtain a singleSpanspanning the whole group.Keyword construction now requires a single span; an array of 1 span is no longer accepted. Use
Tokeninstead ofToken.Some token types have been renamed to conform with terminology used by the Rust Reference. These are
Add->Plus,Bang->Not,Colon2->PathSep,Div->Slash,Dot2->DotDot,Dot3->DotDotDot,Rem->Percent, andSub->Minus.More
Several enums have been made
#[non_exhaustive]in anticipation of upcoming language changes. This includesWherePredicate,Lit, andGenericArgument.The
impl Extend<Pair<T, P>> for Punctuated<T, P>now requiresP: Defaultand will push a default punctuation between the pre-existing elements and the new ones, if there is not already a trailing punctuation. Previously it would panic in this situation.ParseStream::parse_terminatednow takes a peek-style punctuation argument instead of turbofish. Replaceinput.parse_terminated::<_, Token![,]>(Thing::parse)withinput.parse_terminated(Thing::parse, Token![,]).Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Renovate Bot.
/contractor refresh
Contractor triggered renovate refresh on this repository
This comment will be updated with statusdone
This comment was generated by Contractor
04253239d0tof4fa1acedaf4fa1acedato8998096cf08998096cf0to33b0d200fc33b0d200fctodb8de1842fdb8de1842fto50d55fd0c550d55fd0c5to9928e0f1b09928e0f1b0to1662f301871662f30187to0b314cf5cf0b314cf5cfto3b7771888e3b7771888etobd3db50b88bd3db50b88toe0dcd531fbe0dcd531fbto9ff82949219ff8294921to0feec859fb0feec859fbto9ea6f1fcf59ea6f1fcf5to722b7c498d722b7c498dto969c6dbee0969c6dbee0to9504f980869504f98086to8332a9dc5b8332a9dc5bto9dc92a438b9dc92a438bto973a603367973a603367toebaad8f5d3ebaad8f5d3to3497dca8cc3497dca8ccto25adbc7ba525adbc7ba5todc8a34a513dc8a34a513to8cbe5ac2648cbe5ac264tob1a5f47b05