about summary refs log tree commit diff
path: root/src/test/ui/lexer
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-878/+0
2023-01-02Print correct base for too-large literalsclubby789-24/+62
Also update tests
2022-12-27Silence knock-down errors on `[type error]` bindingsEsteban Küber-40/+3
Fix #56036, fix #76589.
2022-12-05Tweak "the following other types implement trait"Esteban Küber-10/+8
When *any* of the suggested impls is an exact match, *only* show the exact matches. This is particularly relevant for integer types. fix fmt
2022-11-16Use `token::Lit` in `ast::ExprKind::Lit`.Nicholas Nethercote-40/+73
Instead of `ast::Lit`. Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing. This commit changes the language very slightly. Some programs that used to not compile now will compile. This is because some invalid literals that are removed by `cfg` or attribute macros will no longer trigger errors. See this comment for more details: https://github.com/rust-lang/rust/pull/102944#issuecomment-1277476773
2022-11-16Add a test for different stages of lexer error reporting.Nicholas Nethercote-0/+101
2022-09-18Add unit test for identifier Unicode emoji diagnosticsCharles Lew-0/+69
2022-04-04Refer to the TraitRef::identity in the message to be clearerEsteban Kuber-2/+2
2022-04-04Dedup logic and improve output for other types that impl traitEsteban Kuber-10/+10
2022-04-04Fix list lengthEsteban Kuber-0/+8
2022-04-04Mention implementers of unsatisfied traitEsteban Kuber-0/+12
When encountering an unsatisfied trait bound, if there are no other suggestions, mention all the types that *do* implement that trait: ``` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:22:6 | LL | impl Baz<f32> for f32 { } | ^^^^^^^^ the trait `Foo` is not implemented for `f32` | = help: the following other types implement trait `Foo`: Option<T> i32 str note: required by a bound in `Baz` --> $DIR/impl_wf.rs:18:31 | LL | trait Baz<U: ?Sized> where U: Foo { } | ^^^ required by this bound in `Baz` ``` Mention implementers of traits in `ImplObligation`s. Do not mention other `impl`s for closures, ranges and `?`.
2022-02-14suggest using raw string literals when invalid escapes appearErin Petra Sofiya Moon-0/+8
i'd guess about 70% of "bad escape" cases occur when someone meant to use a raw string literal because they're passing it directly to Regex::new(). this emits an advisory (Applicability::MaybeIncorrect) help: suggestion to the user that they use an r"" string, on top of the normal notes about looking at the string literal documentation/spec.
2021-11-25Move some tests to more reasonable directoriesCaio-0/+648