Skip to content

Commit

Permalink
Bump syn dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 26, 2023
1 parent cf325e8 commit ad83037
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 98 deletions.
8 changes: 4 additions & 4 deletions tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum DiagnosticOnEnum {
#[derive(Diagnostic)]
#[diag(no_crate_example, code = "E0123")]
#[diag = "E0123"]
//~^ ERROR expected parentheses: #[diag(...)]
//~^ ERROR failed to resolve: maybe a missing crate `core`
struct WrongStructAttrStyle {}

#[derive(Diagnostic)]
Expand Down Expand Up @@ -644,7 +644,7 @@ struct MissingCodeInSuggestion {
//~| ERROR cannot find attribute `multipart_suggestion` in this scope
#[multipart_suggestion()]
//~^ ERROR cannot find attribute `multipart_suggestion` in this scope
//~| ERROR unexpected end of input, unexpected token in nested attribute, expected ident
//~| ERROR `#[multipart_suggestion(...)]` is not a valid attribute
struct MultipartSuggestion {
#[multipart_suggestion(no_crate_suggestion)]
//~^ ERROR `#[multipart_suggestion(...)]` is not a valid attribute
Expand Down Expand Up @@ -797,15 +797,15 @@ struct SuggestionsNoItem {
struct SuggestionsInvalidItem {
#[suggestion(code(foo))]
//~^ ERROR `code(...)` must contain only string literals
//~| ERROR unexpected token
//~| ERROR failed to resolve: maybe a missing crate `core`
sub: Span,
}

#[derive(Diagnostic)] //~ ERROR cannot find value `__code_34` in this scope
#[diag(no_crate_example)]
struct SuggestionsInvalidLiteral {
#[suggestion(code = 3)]
//~^ ERROR expected string literal
//~^ ERROR failed to resolve: maybe a missing crate `core`
sub: Span,
}

Expand Down
30 changes: 19 additions & 11 deletions tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ struct G {

#[derive(Subdiagnostic)]
#[label("...")]
//~^ ERROR unexpected literal in nested attribute, expected ident
//~^ ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
struct H {
#[primary_span]
span: Span,
Expand Down Expand Up @@ -134,7 +135,7 @@ struct L {

#[derive(Subdiagnostic)]
#[label()]
//~^ ERROR unexpected end of input, unexpected token in nested attribute, expected ident
//~^ ERROR diagnostic slug must be first argument of a `#[label(...)]` attribute
struct M {
#[primary_span]
span: Span,
Expand Down Expand Up @@ -310,7 +311,8 @@ struct AB {

#[derive(Subdiagnostic)]
union AC {
//~^ ERROR unexpected unsupported untagged union
//~^ ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
span: u32,
b: u64,
}
Expand Down Expand Up @@ -556,7 +558,7 @@ struct BBb {
#[multipart_suggestion(no_crate_example, applicability = "machine-applicable")]
struct BBc {
#[suggestion_part()]
//~^ ERROR unexpected end of input, unexpected token in nested attribute, expected ident
//~^ ERROR `#[suggestion_part(...)]` attribute without `code = "..."`
span1: Span,
}

Expand All @@ -576,11 +578,12 @@ struct BD {
//~^ ERROR `#[suggestion_part(...)]` attribute without `code = "..."`
span1: Span,
#[suggestion_part()]
//~^ ERROR unexpected end of input, unexpected token in nested attribute, expected ident
//~^ ERROR `#[suggestion_part(...)]` attribute without `code = "..."`
span2: Span,
#[suggestion_part(foo = "bar")]
//~^ ERROR `code` is the only valid nested attribute
//~| ERROR expected `,`
//~| ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
span4: Span,
#[suggestion_part(code = "...")]
//~^ ERROR the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
Expand Down Expand Up @@ -672,7 +675,8 @@ enum BL {
struct BM {
#[suggestion_part(code("foo"))]
//~^ ERROR expected exactly one string literal for `code = ...`
//~| ERROR unexpected token
//~| ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
span: Span,
r#type: String,
}
Expand All @@ -682,7 +686,8 @@ struct BM {
struct BN {
#[suggestion_part(code("foo", "bar"))]
//~^ ERROR expected exactly one string literal for `code = ...`
//~| ERROR unexpected token
//~| ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
span: Span,
r#type: String,
}
Expand All @@ -692,7 +697,8 @@ struct BN {
struct BO {
#[suggestion_part(code(3))]
//~^ ERROR expected exactly one string literal for `code = ...`
//~| ERROR unexpected token
//~| ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
span: Span,
r#type: String,
}
Expand All @@ -713,7 +719,8 @@ struct BP {
#[multipart_suggestion(no_crate_example)]
struct BQ {
#[suggestion_part(code = 3)]
//~^ ERROR expected string literal
//~^ ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
span: Span,
r#type: String,
}
Expand Down Expand Up @@ -805,7 +812,8 @@ struct SuggestionStyleInvalid3 {
#[derive(Subdiagnostic)]
#[suggestion(no_crate_example, code = "", style("foo"))]
//~^ ERROR expected `= "xxx"`
//~| ERROr expected `,`
//~| ERROR failed to resolve: maybe a missing crate `core`?
//~| NOTE maybe a missing crate `core`?
struct SuggestionStyleInvalid4 {
#[primary_span]
sub: Span,
Expand Down
Loading

0 comments on commit ad83037

Please sign in to comment.