about summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2020-03-26permit negative impls for non-auto traitsNiko Matsakis-23/+0
2020-03-24Rollup merge of #70077 - Aaron1011:feature/new-def-path-ident, r=petrochenkovMazdak Farrokhzad-3/+36
Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-23Auto merge of #69649 - estebank:negative-impl-span, r=Centrilbors-3/+5
Tweak output for invalid negative impl errors Follow up to #69722. Tweak negative impl errors emitted in the HIR: ``` error[E0192]: invalid negative impl --> $DIR/E0192.rs:9:6 | LL | impl !Trait for Foo { } | ^^^^^^ | = note: negative impls are only allowed for auto traits, like `Send` and `Sync` ```
2020-03-23Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasperMazdak Farrokhzad-11/+16
Increase verbosity when suggesting subtle code changes Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion. Fix #69243.
2020-03-23Ignore tests on some platforms due to #53081Aaron Hill-3/+18
2020-03-22Tweak output for invalid negative impl errorsEsteban Küber-3/+5
2020-03-22Store idents for `DefPathData` into crate metadataAaron Hill-0/+18
Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-22Use more targetted span for error labelEsteban Küber-2/+2
2020-03-22Normalize wording of privacy access labelsEsteban Küber-4/+4
2020-03-22Add span label to primary error spanEsteban Küber-5/+5
2020-03-22Increase verbosity when suggesting subtle code changesEsteban Küber-1/+6
2020-03-21Bless testsLeSeulArtichaut-12/+9
2020-03-18Rollup merge of #69839 - RalfJung:miri-error-cleanup, r=oli-obkMazdak Farrokhzad-1/+1
Miri error reform Some time ago we started moving Miri errors into a few distinct categories, but we never classified all the old errors. That's what this PR does. ~~This is on top of https://github.com/rust-lang/rust/pull/69762; [relative diff](https://github.com/RalfJung/rust/compare/validity-errors...RalfJung:miri-error-cleanup).~~ r? @oli-obk Fixes https://github.com/rust-lang/const-eval/issues/4
2020-03-18Rollup merge of #69838 - Centril:expand-module, r=petrochenkovMazdak Farrokhzad-2/+2
Expansion-driven outline module parsing After this PR, the parser will not do any conditional compilation or loading of external module files when `mod foo;` is encountered. Instead, the parser only leaves `mod foo;` in place in the AST, with no items filled in. Expansion later kicks in and will load the actual files and do the parsing. This entails that the following is now valid: ```rust #[cfg(FALSE)] mod foo { mod bar { mod baz; // `foo/bar/baz.rs` doesn't exist, but no error! } } ``` Fixes https://github.com/rust-lang/rust/issues/64197. r? @petrochenkov
2020-03-18tweak outline module parsing spansMazdak Farrokhzad-2/+2
2020-03-17Update tests for erasing regions in typeckMatthew Jasper-1/+1
2020-03-16Rollup merge of #69520 - kornelski:e69492, r=cramertjDylan DPC-1/+1
Make error message clearer about creating new module This is a partial improvement for #69492
2020-03-12update testsMark Mansi-2/+2
2020-03-11make error message less confusingRalf Jung-1/+1
2020-03-11generalize InvalidNullPointerUsage to InvalidIntPointerUsageRalf Jung-1/+1
2020-03-07Make error message clearer about creating new moduleKornel-1/+1
2020-03-05review commentsEsteban Küber-4/+5
2020-03-04Tweak output for invalid negative impl AST errorsEsteban Küber-3/+3
2020-03-01doc(librustc_error_codes): add long error explanation for E0719Matthew Kuo-0/+1
Progresses #61137
2020-02-20Rollup merge of #68877 - estebank:point-at-params, r=petrochenkovMazdak Farrokhzad-13/+23
On mismatched argument count point at arguments
2020-02-17Do not emit note suggesting to implement trait to foreign typeLeSeulArtichaut-2/+0
Update tests Extend to other operations Refractor check in a separate function Fix more tests
2020-02-13Constness -> enum Const { Yes(Span), No }Mazdak Farrokhzad-2/+6
Same idea for `Unsafety` & use new span for better diagnostics.
2020-02-11On mismatched argument count point at argumentsEsteban Küber-13/+23
2020-02-11Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPCbors-10/+10
Make issue references consistent Fixes https://github.com/rust-lang/rust/issues/62976 cc https://github.com/rust-lang/rust/pull/63008 r? @varkor because you reviewed the original pr
2020-02-10Rollup merge of #68908 - jwhite927:E0637, r=Dylan-DPCDylan DPC-0/+1
Add long error code explanation message for E0637 Reference issue [#61137](https://github.com/rust-lang/rust/issues/61137) To incorporate a long error description for E0637, I have made the necessary modification to error_codes.rs and added error_codes/E0637.md, and blessed the relevant .stderror files. ~~, however when I build rustc stage 1, I am unable to make `$ rustc --explain E0637` work even though rustc appears to be able to call up the long error explanations for other errors. I wanted to guarantee this would work before moving on the blessing the various ui tests that have been affected. @GuillaumeGomez Do you know the most likely reason(s) why this would be the case?~~ Update: `$ rustc --explain E0637` works now.
2020-02-09--bless --compare-mode=nllMatthias Prechtl-10/+10
2020-02-09Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasperbors-20/+0
Initial implementation of `#![feature(move_ref_pattern)]` Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary. Closes #45600. Tracking issue: #68354. r? @matthewjasper
2020-02-07Merge branch 'master' of https://github.com/jwhite927/rust into E0637Josh White-0/+4
2020-02-07performed --bless of 15 ui tests affectedJosh White-0/+1
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+4
2020-02-06Auto merge of #68583 - estebank:hrlt, r=oli-obkbors-8/+8
Account for HR lifetimes when suggesting introduction of named lifetime ``` error[E0106]: missing lifetime specifier --> src/test/ui/suggestions/fn-missing-lifetime-in-item.rs:2:32 | 2 | struct S2<F: Fn(&i32, &i32) -> &i32>(F); | ---- ---- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html help: consider making the bound lifetime-generic with a new `'a` lifetime | 2 | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F); | ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ help: consider introducing a named lifetime parameter | 2 | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F);= | ^^^ ^^^^^^^ ^^^^^^^ ^^^ ``` Follow up to #68267. Addresses the diagnostics part of #49287.
2020-02-05review commentsEsteban Küber-7/+7
2020-02-05Suggest `'r` instead of `'lifetime`Esteban Küber-8/+8
2020-02-05`#![recursion_limit = "X"]`: note current crate name.Mazdak Farrokhzad-2/+2
2020-02-02Use more appropriate spans on object unsafe traits and provide structured ↵Esteban Küber-3/+9
suggestions when possible
2020-02-02Wording changes to object unsafe trait errorsEsteban Küber-3/+15
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-02-02Use more accurate failed predicate spansEsteban Küber-2/+2
2020-02-02Point at arguments or output when fn obligations come from them, or ident ↵Esteban Küber-2/+2
when they don't
2020-02-02move_ref_patterns: introduce testsMazdak Farrokhzad-20/+0
bindings_after_at: harden tests
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-2/+2
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-25Don't use spaces before type ascription like colonsOliver Scherer-1/+1
2020-01-24Normalise notes with the/isvarkor-2/+2
2020-01-19review commentsEsteban Küber-4/+4
2020-01-19When encountering an expected named lifetime and none are present, suggest ↵Esteban Küber-5/+29
adding one
2020-01-19When encountering an undefined named lifetime, point to where it can beEsteban Küber-1/+5
This doesn't mention that using an existing lifetime is possible, but that would hopefully be clear as always being an option. The intention of this is to teach newcomers what the lifetime syntax is.