Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rust crate syn to 1.0.109 #56

Merged
merged 1 commit into from
May 2, 2024
Merged

Update Rust crate syn to 1.0.109 #56

merged 1 commit into from
May 2, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 2, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
syn dependencies patch 1 -> 1.0.109

Release Notes

dtolnay/syn (syn)

v1.0.109

Compare Source

v1.0.108

Compare Source

  • Fix handling of unusual whitespace after escaped newlines in LitStr::value (#​1381, thanks @​ModProg)

v1.0.107

Compare Source

  • Opt out of -Zrustdoc-scrape-examples on docs.rs for now

v1.0.106

Compare Source

  • Documentation improvements

v1.0.105

Compare Source

  • Improve parse errors related to dyn and impl type syntax (#​1245)

v1.0.104

Compare Source

  • Add PathArguments::is_none()

v1.0.103

Compare Source

v1.0.102

Compare Source

  • More efficient internal representation for TokenBuffer (#​1223, thanks @​CAD97)
  • Fix parsing of a left shift after macro metavariable in type position (#​1229)

v1.0.101

Compare Source

  • Eliminate a bunch of redundant work done by LitStr::parse (#​1221)

v1.0.100

Compare Source

v1.0.99

Compare Source

  • Add categories and keywords to crates.io metadata

v1.0.98

Compare Source

  • Format example code with rustfmt

v1.0.97

Compare Source

  • Update examples

v1.0.96

Compare Source

  • Add a punct_mut() method on syn::punctuated::Pair to return Option<&mut P> (#​1183)

v1.0.95

Compare Source

v1.0.94

Compare Source

  • Resolve some unused_macro_rules warnings

v1.0.93

Compare Source

  • Fix compile error when Some means something unusual in the expression namespace of the scope where custom_keyword is invoked (#​1171, thanks @​zakarumych)

v1.0.92

Compare Source

v1.0.91

Compare Source

  • impl ToTokens for RangeLimits
  • impl Parse for ExprAwait
  • impl Parse for GenericMethodArgument
  • impl Parse for MethodTurbofish

v1.0.90

Compare Source

  • Update recommended exhaustive matching idiom to use non_exhaustive_omitted_patterns lint:

    match expr {
        Expr::Array(e) => {}
        Expr::Assign(e) => {}
        ...
        Expr::Yield(e) => {}
    
        #[cfg_attr(test, deny(non_exhaustive_omitted_patterns))]
        _ => {/* some sane fallback */}
    }

v1.0.89

Compare Source

v1.0.88

Compare Source

  • Parse .. pattern in pattern of let (#​1136)
  • Parse for<…> lifetime introducer on closures (#​1135)
  • Reject postfix operators after cast (#​1117)
  • Implement extra-traits for Nothing (#​1144)

v1.0.87

Compare Source

v1.0.86

Compare Source

  • Add support for parsing if- and while-let-chains (RFC 2497)

v1.0.85

Compare Source

  • Add token() method to each variant of syn::Lit to expose the underlying token representation with original formatting

v1.0.84

Compare Source

v1.0.83

Compare Source

  • Fix panic parsing trait impl with qself in trait type: impl <Thing<>>::Trait for Type {} (#​1109)
  • Preserve attributes on let-else stmt: #[attr] let pat = val else { return } (#​1110)

v1.0.82

Compare Source

  • Support parenthesized generic argument syntax with :: disambiguator: Fn::() -> ! (#​1096)

v1.0.81

Compare Source

  • Support arbitrary precision negative literal tokens on rustc 1.56+ (#​1087, #​1088)

v1.0.80

Compare Source

v1.0.79

Compare Source

v1.0.78

Compare Source

  • Parse trailing + in the bounds of impl Trait type (#​1073)

v1.0.77

Compare Source

  • Match Rust 1.57+'s parsing of dot and question mark after a curly braced macro invocation (#​1068)

v1.0.76

Compare Source

  • Parse unstable letelse syntax (#​1050, #​1057)
  • Parse qualified braced variant expressions and patterns: <E>::V {..} (#​1058, #​1059)
  • Fix precedence of outer attributes in front of an assignment expression in statement position (#​1060)

v1.0.75

Compare Source

  • Improve spans on a method without body inside an impl block
  • Documentation improvements (#​922, thanks @​Tamschi)

v1.0.74

Compare Source

  • Reject for<'a> dyn Trait<'a> syntax; the correct representation is dyn for<'a> Trait<'a> (#​1042)

v1.0.73

Compare Source

v1.0.72

Compare Source

  • Parse const generics which use value of a previous const generic parameter as a default value (#​1027)

v1.0.71

Compare Source

  • Fix panic deserializing an ItemImpl with a non-path in trait position (#​1023)
  • Parse visibility on impl blocks (#​1024)
  • Fix parsing a type parameter default on the first generic parameter of an impl block (#​1025, thanks @​taiki-e)

v1.0.70

Compare Source

  • Fix precedence of closure body vs ExprRange rhs: || .. .method() (#​1019)
  • Parse inner attributes inside of structs and enums (#​1022)

v1.0.69

Compare Source

v1.0.68

Compare Source

  • Preserve span of LexError on conversion to syn::Error (#​1006)

v1.0.67

Compare Source

  • Accept outer attributes in the Parse impl of ExprBlock (#​1004)

v1.0.66

Compare Source

  • Parse equality constraints on generic associated types (#​979)
  • Parse default value exprs in const generic declarations (#​980)
  • Fix infinite loop parsing malformed type ascription expression in non-full mode (#​978)
  • Improve Parse impls of ExprArray, ExprAsync, ExprBlock, ExprMacro, ExprParen, ExprRepeat, ExprStruct, ExprTryBlock, ExprUnsafe to succeed parsing even in the presence of trailing binary operators (#​991, #​992, #​993, #​994, #​995, #​996, #​997, #​998, #​999)

v1.0.65

Compare Source

v1.0.64

Compare Source

  • Avoid clippy::expl_impl_clone_on_copy pedantic lint in downstream custom token types (#​976)

v1.0.63

Compare Source

  • Fix parsing associated types with empty trait bound list after colon (#​974)

v1.0.62

Compare Source

v1.0.61

Compare Source

  • Improve assertion failures on invalid use of Punctuated API (#​970, thanks @​osa1)
  • Add Lifetime::span and Lifetime::set_span accessors (#​971)

v1.0.60

Compare Source

  • Provide an idiom for testing exhaustiveness of pattern matches on Expr, Type, Pat, Item, ForeignItem, TraitItem, and ImplItem (#​694)

    match expr {
        Expr::Array(e) => {...}
        Expr::Assign(e) => {...}
        ...
        Expr::Yield(e) => {...}
    
        #[cfg(test)]
        Expr::__TestExhaustive(_) => unimplemented!(),
        #[cfg(not(test))]
        _ => { /* some sane fallback */ }
    }

    The above is the only supported idiom for exhaustive matching of those enum. Do not write anything differently as it is not supported.

    The conditional compilation on match-arms lets us fail your tests but not break your library when adding a variant. You will be notified by a test failure when a variant is added, so that you can add code to handle it, but your library will continue to compile and work for downstream users in the interim.

v1.0.59

Compare Source

  • Parse empty supertrait lists consistently with rustc (#​952)
  • Fix loss of span information on comma tokens inside of Type::Tuple during parse (#​959)

v1.0.58

Compare Source

  • Allow literals to parse as a const generic path argument even without "full" feature enabled (#​951)

    pub struct Struct {
        array: Array<10>,  // used to require `features = "full"`
    }

v1.0.57

Compare Source

  • Make Punctuated::new available as a const fn (#​949)

v1.0.56

Compare Source

v1.0.55

Compare Source

  • Preserve None-delimited group around macro metavariable when parsing T<$ty> (#​944, #​945)

v1.0.54

Compare Source

  • Fix parsing of impl items with macro metavariable in the trait path: impl $trait for Type {...} (#​942)

v1.0.53

Compare Source

  • Parse impl !Trait {...} syntax (#​936)

v1.0.52

Compare Source

  • Parse unsafe extern block syntax (#​918)
  • Parse unsafe mod syntax (#​919)
  • Parse const {...} block syntax (#​921)
  • Parse destructuring assignment syntax (#​933)

v1.0.51

Compare Source

  • Allow parsing signatures in which const generic params appear in front of lifetime params (#​920)

v1.0.50

Compare Source

  • Apply doc(cfg(...)) on feature gated APIs for docs.rs-rendered documentation (#​925)

v1.0.48

Compare Source

v1.0.47

Compare Source

  • Documentation improvements

v1.0.46

Compare Source

  • Fix parsing structured attributes that contain nested absolute paths, such as #[derive(::serde::Serialize)] (#​909)

v1.0.45

Compare Source

  • Provide more detailed error messages when parsing specific literal kind (#​908)

v1.0.44

Compare Source

  • Fix some parsing of patterns inside of None-delimited groups (#​907)

v1.0.43

Compare Source

  • Add Parse impl for syn::Signature

v1.0.42

Compare Source

  • Fix several bugs involving unusual suffixes on integer and floating point literal tokens (#​898, #​899, #​900)

v1.0.41

Compare Source

  • Fix panic on printing an incomplete (having fewer path segments than originally parsed with) qualified path (ExprPath, PatPath, TypePath containing QSelf) (#​891, thanks @​taiki-e)
  • Fix panic triggered by syntactically invalid overflowing negative float literal after . in a field access position, e.g. let _ = obj.-0.9E999999 (#​895, thanks @​sameer)
  • Enable using parse_macro_input! with a Parser function rather than type having a Parse impl (#​896, thanks @​sbrocket)

v1.0.40

Compare Source

  • Fix panic on parsing float literals having both an exponent and a suffix beginning with 'e' or 'E', such as 9e99e999 (#​893)

v1.0.39

Compare Source

  • Improve compile time by pre-expanding derives (#​885)
  • Parse const generic parameters in any order relative to type parameters (#​886)

v1.0.38

Compare Source

v1.0.37

Compare Source

v1.0.36

Compare Source

  • Add Lit::span, Lit::set_span (#​874)

v1.0.35

Compare Source

  • Fix parsing of Expr::Field in non-full mode (#​870)

v1.0.34

Compare Source

  • Documentation improvements

v1.0.33

Compare Source

v1.0.32

Compare Source

  • Fix parsing $:item macro_rules metavariables containing outer attributes (#​852)

v1.0.31

Compare Source

  • Add Expr::parse_without_eager_brace to parse expressions in ambiguous syntactic position.

    Rust grammar has an ambiguity where braces sometimes turn a path expression into a struct initialization and sometimes do not. In the following code, the expression S {} is one expression. Presumably there is an empty struct struct S {} defined somewhere which it is instantiating.

    let _ = *S {};
    
    // parsed by rustc as: `*(S {})`

    We would want to parse the above using Expr::parse after the = token.

    But in the following, S {} is not a struct init expression.

    if *S {} {}
    
    // parsed by rustc as:
    //
    //    if (*S) {
    //        /* empty block */
    //    }
    //    {
    //        /* another empty block */
    //    }

    For that reason we would want to parse if-conditions using Expr::parse_without_eager_brace after the if token. Same for similar syntactic positions such as the condition expr after a while token or the expr at the top of a match.

    The Rust grammar's choices around which way this ambiguity is resolved at various syntactic positions is fairly arbitrary. Really either parse behavior could work in most positions, and language designers just decide each case based on which is more likely to be what the programmer had in mind most of the time.

    if return S {} {}
    
    // parsed by rustc as:
    //
    //    if (return (S {})) {
    //    }
    //
    // but could equally well have been this other arbitrary choice:
    //
    //    if (return S) {
    //    }
    //    {}

    Note the grammar ambiguity on trailing braces is distinct from precedence and is not captured by assigning a precedence level to the braced struct init expr in relation to other operators. This can be illustrated by return 0..S {} vs match 0..S {}. The former parses as return (0..(S {})) implying tighter precedence for struct init than .., while the latter parses as match (0..S) {} implying tighter precedence for .. than struct init, a contradiction.

v1.0.30

Compare Source

  • Parse struct init expressions where the type name is an interpolated macro_rules metavariable, such as $struct {} where $struct:ident (#​842)
  • Handle nesting of None-delimited groups (#​843, thanks @​Aaron1011)

v1.0.29

Compare Source

  • Parse macro call exprs where the macro name is an interpolated macro_rules metavariable, such as $macro!() (#​838)
  • Parse paths containing generic parameters where the first path segment is an interpolated macro_rules metavariable, such as $seg<'a> (#​839)

v1.0.28

Compare Source

  • Recognize empty None-delimited group produced by interpolating a $:vis macro metavariable when parsing a Visibility (#​836)

v1.0.27

Compare Source

  • Parse function calls in which the callee is an interpolated macro variable $fn(...) (#​833)

v1.0.26

Compare Source

v1.0.25

Compare Source

v1.0.24

Compare Source

  • Parse mut self receiver in function pointer type (#​812, #​814)
  • Parse const trait impls (#​813)
  • Improve error reporting inside struct expressions and struct patterns (#​818)

v1.0.23

Compare Source

  • Parse inner attributes in traits (#​803)
  • Parse const underscore in traits and impls (#​804)
  • Implement Extend for Error (#​805)
  • Parse Or patterns (#​806)
  • Parse outer attributes on Expr* structs (#​807)
  • Parse top level const/static without value (#​808)
  • Parse syntactically accepted functions (#​809)
  • Parse extern static with value (#​810)

Thanks @​taiki-e for all of these.

v1.0.22

Compare Source

  • Parse literal suffix on byte string, byte, and char literal tokens: br#"..."#suffix, b'?'suffix, '?'suffix (#​799, #​800)

v1.0.21

Compare Source

  • Documentation improvements

v1.0.20

Compare Source

  • Improve span of error message when an error during syn::Macro::parse_body is triggered past the last token of the macro body (#​791)

v1.0.19

Compare Source

  • Parse a more lenient extern type syntax inside extern blocks (#​763)

v1.0.18

Compare Source

  • Ignore unparsed empty None-delimited groups at the end of a macro input (#​783)

v1.0.17

Compare Source

  • Expose syn::Lit in default-features = false mode

v1.0.16

Compare Source

v1.0.15

Compare Source

v1.0.14

Compare Source

v1.0.13

Compare Source

  • Allow parse_quote! to parse Vec<Stmt>, with the same behavior as Block::parse_within (#​741)

v1.0.12

Compare Source

  • Reject function signatures with an incorrectly placed receiver parameter, like fn f(x: u8, &self)
  • Produce correctly spanned error when parsing punct beyond the end of a delimited group (#​739)

v1.0.11

Compare Source

  • Implement quote::IdentFragment for syn::Member and syn::Index so that spans are preserved when using these types in quote's format_ident! macro

    use quote::format_ident;
    use syn::Index;
    
    let index: Index = /* ... */;
    let ident = format_ident!("__{}", index); // produces __0, __1, etc

v1.0.10

Compare Source

  • Provide Hash and Eq impls for syn::Member even without "extra-traits" feature enabled, as this type is commonly useful in a hashset

v1.0.9

Compare Source

v1.0.8

Compare Source

  • Require trailing comma when parsing TypeTuple with one element (#​716, thanks @​8BitMate)

v1.0.7

Compare Source

  • Add a receiver getter to syn::Signature (#​714, thanks @​mystor)

    impl Signature {
        /// A method's `self` receiver, such as `&self` or `self: Box<Self>`.
        pub fn receiver(&self) -> Option<&FnArg>;
    }

v1.0.6

Compare Source

v1.0.5

Compare Source

  • Expose syn::Variadic with just "derive" feature, not "full", because it appears in Type::BareFn

v1.0.4

Compare Source

v1.0.3

Compare Source

v1.0.2

Compare Source

  • Documentation improvements

v1.0.1

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot merged commit 4465d4e into main May 2, 2024
1 check passed
@renovate renovate bot deleted the renovate/syn-1.x branch May 2, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants