about summary refs log tree commit diff
path: root/src/test/ui/rust-2018
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-6864/+0
2022-12-26address review comments + better testsLukas Markeffsky-43/+322
2022-12-22Fix `explicit_outlives_requirements` lint in macrosLukas Markeffsky-3/+66
Show the suggestion if and only if the bounds are from the same source context.
2022-10-01bless ui testsMaybe Waffle-22/+22
2022-07-07Track implicit `Sized` obligations in type paramsEsteban Küber-1/+1
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
2022-06-25Rollup merge of #98298 - TaKO8Ki:point-to-type-param-definition, ↵Matthias Krüger-1/+1
r=compiler-errors Point to type parameter definition when not finding variant, method and associated item fixes #77391
2022-06-22point to type param definition when not finding variant, method and assoc typeTakayuki Maeda-1/+1
use `def_ident_span` , `body_owner_def_id` instead of `in_progress_typeck_results`, `guess_head_span` use `body_id.owner` directly add description to label
2022-06-16diagnostics: fix trailing spaceklensy-68/+68
2022-06-14suggest adding a `#[macro_export]` to a private macroTakayuki Maeda-4/+4
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-26/+26
2022-05-12Auto merge of #96150 - est31:unused_macro_rules, r=petrochenkovbors-2/+2
Implement a lint to warn about unused macro rules This implements a new lint to warn about unused macro rules (arms/matchers), similar to the `unused_macros` lint added by #41907 that warns about entire macros. ```rust macro_rules! unused_empty { (hello) => { println!("Hello, world!") }; () => { println!("empty") }; //~ ERROR: 1st rule of macro `unused_empty` is never used } fn main() { unused_empty!(hello); } ``` Builds upon #96149 and #96156. Fixes #73576
2022-05-07Add test.Camille GILLOT-0/+48
2022-05-05Allow unused rules in the testsuite where the lint triggersest31-2/+2
2022-04-03Improve method name suggestionsOliver Downard-0/+4
Attempts to improve method name suggestions when a matching method name is not found. The approach taken is use the Levenshtein distance and account for substrings having a high distance but can sometimes be very close to the intended method (eg. empty vs is_empty).
2022-03-25resolve: Do not build expensive suggestions if they are not actually usedVadim Petrochenkov-190/+19
Also remove a redundant parameter from `fn resolve_path(_with_ribs)`, `crate_lint: CrateLint` is a more detailed version of `record_used: bool` with `CrateLint::No` meaning `false` and anything else meaning `true`.
2022-03-04Rollup merge of #94595 - ↵Dylan DPC-0/+15
TaKO8Ki:fix-invalid-unresolved-imports-errors-for-asterisk-wildcard-syntax, r=estebank Fix invalid `unresolved imports` errors for a single-segment import closes #90248
2022-03-04fix invalid `unresolved imports` errors the asterisk wildcard syntax causesTakayuki Maeda-0/+15
use a path variabale
2022-03-03Cleanup feature gates.Camille GILLOT-4/+2
2022-01-27Improve suggestion for escaping reserved keywordsNoah Lev-2/+2
2022-01-23Remove deduplication of early lintsAaron Hill-14/+269
We already have a general mechanism for deduplicating reported lints, so there's no need to have an additional one for early lints specifically. This allows us to remove some `PartialEq` impls.
2021-12-01Improve suggestion for extern crate self error messageMichael-4/+20
2021-11-20Clarify error messages caused by re-exporting `pub(crate)` visibility to outsideKen Matsui-2/+2
2021-10-30Add #[must_use] to remaining std functions (A-N)John Kugelman-4/+4
2021-10-25Edit error messages for rustc_resolve::AmbiguityKind variantspierwill-10/+20
Emit description of the ambiguity as a note. Co-authored-by: Noah Lev <camelidcamel@gmail.com> Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2021-10-17Rollup merge of #89738 - eddyb:extern-crate-recursion, r=nagisaMatthias Krüger-0/+66
ty::pretty: prevent infinite recursion for `extern crate` paths. Fixes #55779, fixes #87932. This fix is based on `@estebank's` idea in https://github.com/rust-lang/rust/issues/55779#issuecomment-614758510 - but instead of trying to get `try_print_visible_def_path_recur`'s cycle detection to work in this case, this PR "just" disables the "visible path" feature when printing the path to an `extern crate`, so that the old recursion chain of `try_print_visible_def_path -> print_def_path -> try_print_visible_def_path`, is now impossible. Both tests have been confirmed to crash `rustc` because of a stack overflow, without the fix.
2021-10-15Bless testsCameron Steffen-2/+2
2021-10-10ty::pretty: prevent infinite recursion for `extern crate` paths.Eduard-Mihai Burtescu-0/+66
2021-09-02Bless tests.Camille GILLOT-2/+4
2021-08-11Modify structured suggestion outputEsteban Küber-137/+205
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-06-25Address PR feedbackRyan Levick-139/+135
2021-06-25Change how edition based future compatibility warnings are handledRyan Levick-107/+107
2021-05-12Show macro name in 'this error originates in macro' messageAaron Hill-2/+2
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
2021-05-04Auto merge of #83213 - rylev:update-lints-to-errors, r=nikomatsakisbors-40/+4
Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021 This addresses https://github.com/rust-lang/rust/pull/81244 by updating two lints to errors in the Rust 2021 edition. r? `@estebank`
2021-04-23Tweak suggestion outputEsteban Küber-0/+6
2021-04-16Fix testsRyan Levick-40/+4
2020-05-07reword "possible candidate" import suggestionAndy Russell-1/+1
2020-04-23Moving more build-pass tests to check-passVal Markovic-7/+7
One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277
2020-04-11rustc: Add a warning count upon completionRoccoDev-0/+10
2020-03-07resolve: `directive` -> `import`Vadim Petrochenkov-2/+2
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+4
2020-01-24Normalise notes with the/isvarkor-19/+19
2020-01-09Update testsVadim Petrochenkov-3/+42
2019-11-10Make error and warning annotations mandatory in UI testsTomasz Miąsko-10/+20
This change makes error and warning annotations mandatory in UI tests. The only exception are tests that use error patterns to match compiler output and don't have any annotations.
2019-11-04Use check-pass in ui tests where appropriateTomasz Miąsko-1/+1
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+69
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+1
2019-09-30Fixed grammar in one diagnostic and blessed tests.Alexander Regueiro-3/+3
2019-09-09Rollup merge of #64054 - estebank:unused-import-is-to-eager, r=petrochenkovMazdak Farrokhzad-4/+4
Always emit unresolved import errors and hide unused import lint Fix https://github.com/rust-lang/rust/issues/63724. r? @petrochenkov
2019-09-08Give method not found a primary span labelEsteban Küber-3/+3
2019-09-08Always emit unresolved import errors and hide unused import lintEsteban Küber-4/+4