about summary refs log tree commit diff
path: root/src/test/ui/imports
AgeCommit message (Collapse)AuthorLines
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-4/+4
2019-04-11Reword tracking issue noteEsteban Küber-3/+3
2019-04-10Tweak unstable diagnostic outputEsteban Küber-3/+6
2019-03-31Distinguish depending on error levelYuki OKUSHI-1/+1
Remove unnecessary comment
2019-03-24Rollup merge of #59296 - petrochenkov:stdup, r=estebankkennytm-0/+10
Do not encode gensymed imports in metadata (Unless they are underscore `_` imports which are re-gensymed on crate loading, see https://github.com/rust-lang/rust/pull/56392.) We cannot encode gensymed imports properly in metadata and if we encode them improperly, we can get erroneous name conflicts downstream. Gensymed imports are produced by the compiler, so we control their set, and can be sure that none of them needs being encoded for use from other crates. A workaround that fixes https://github.com/rust-lang/rust/issues/59243.
2019-03-23Mark duplicate import removal suggestion tool onlyEsteban Küber-1/+0
2019-03-23Tweak unnecessary import suggestionEsteban Küber-4/+2
2019-03-19Do not encode gensymed imports in metadataVadim Petrochenkov-0/+10
2019-03-11Update testsVadim Petrochenkov-63/+63
2019-03-09use structured suggestions for E0432Andy Russell-1/+4
2019-02-11Use hidden suggestions for unused imports lintEsteban Küber-1/+1
2019-02-08unused_imports: update testsPietro Albini-1/+1
2019-01-31Add suggestion for duplicated import.David Wood-5/+4
This commit adds a suggestion when a import is duplicated (ie. the same name is used twice trying to import the same thing) to remove the second import.
2019-01-26Rollup merge of #57407 - mehcode:stabilize-extern-crate-self, r=CentrilMazdak Farrokhzad-6/+46
Stabilize extern_crate_self Fixes #56409
2019-01-18Rollup merge of #57551 - petrochenkov:regrtest, r=nikomatsakisMazdak Farrokhzad-0/+26
resolve: Add a test for issue #57539 Add a test for the bugfix regression reported in https://github.com/rust-lang/rust/issues/57539 Closes https://github.com/rust-lang/rust/issues/57539
2019-01-14stabilize extern_crate_selfRyan Leckey-6/+46
2019-01-13Rollup merge of #57557 - petrochenkov:ecused, r=varkorMazdak Farrokhzad-0/+66
resolve: Mark extern crate items as used in more cases Fixes https://github.com/rust-lang/rust/issues/57421
2019-01-13resolve: Mark extern crate items as used in more casesVadim Petrochenkov-0/+66
2019-01-13resolve: Add a test for issue #57539Vadim Petrochenkov-0/+26
2019-01-12Fix a hole in generic parameter import future-proofingVadim Petrochenkov-1/+1
Add some tests for buggy derive helpers
2019-01-12Stabilize `uniform_paths`Vadim Petrochenkov-9/+7
2019-01-01Auto merge of #57199 - petrochenkov:ambig, r=estebankbors-2/+13
resolve: Simplify treatment of ambiguity errors If we have a glob conflict like this ```rust mod m1 { struct S; } mod m2 { struct S; } use m1::*; use m2::*; ``` we treat it as a special "ambiguity item" that's not an error by itself, but produces an error when actually used. ```rust use m1::*; // primary use m2::*; // secondary => ambiguity S(m1::S, m2::S); ``` Ambiguity items were *sometimes* treated as their primary items for error recovery, but pretty irregularly. After this PR they are always treated as their primary items, except that - If an ambiguity item is marked as used, then it still produces an error. - Ambiguity items are still filtered away when exported to other crates (which is also a use in some sense).
2018-12-30Auto merge of #57185 - petrochenkov:impice4, r=estebankbors-26/+29
resolve: Fix one more ICE in import validation So if you have an unresolved import ```rust mod m { use foo::bar; } ``` error recovery will insert a special item with `Def::Err` definition into module `m`, so other things depending on `bar` won't produce extra errors. The issue was that erroneous `bar` was overwriting legitimate `bar`s coming from globs, e.g. ```rust mod m { use baz::*; // imports real existing `bar` use foo::bar; } ``` causing some unwanted diagnostics talking about "unresolved items", and producing inconsistent resolutions like https://github.com/rust-lang/rust/issues/57015. This PR stops overwriting real successful resolutions with `Def::Err`s. Fixes https://github.com/rust-lang/rust/issues/57015
2018-12-29resolve: Simplify treatment of ambiguity errorsVadim Petrochenkov-23/+15
2018-12-29resolve: Never override real bindings with `Def::Err`s from error recoveryVadim Petrochenkov-26/+29
2018-12-27Update references to closed issueIan Douglas Scott-3/+3
Issue #28979 was closed with a link to #55467.
2018-12-25Remove licensesMark Rousskov-364/+84
2018-12-08Rollup merge of #56620 - petrochenkov:noclutter, r=estebankMazdak Farrokhzad-21/+7
resolve: Reduce some clutter in import ambiguity errors Noticed in https://www.reddit.com/r/rust/comments/a3pyrw/announcing_rust_131_and_rust_2018/eb8alhi/. The first error is distracting, but unnecessary, it's a *consequence* of the ambiguity error and appears because one of the ambiguous `actix` modules (unsurprisingly) doesn't have the expected name in it.
2018-12-08resolve: Reduce some clutter in import ambiguity errorsVadim Petrochenkov-21/+7
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-01resolve: Support aliasing local crate root in extern preludeVadim Petrochenkov-0/+37
2018-11-27resolve: Extern prelude is for type namespace onlyVadim Petrochenkov-0/+8
2018-11-27resolve: Suggest `crate::` for resolving ambiguities when appropriateVadim Petrochenkov-8/+10
More precise spans for ambiguities from macros
2018-11-25resolve: Fix some more asserts in import validationVadim Petrochenkov-25/+61
2018-11-22resolve: Fix some asserts in import validationVadim Petrochenkov-0/+67
2018-11-21Auto merge of #56117 - petrochenkov:iempty, r=eddybbors-0/+11
resolve: Make "empty import canaries" invisible from other crates Empty imports `use prefix::{};` are desugared into `use prefix::{self as _};` to make sure the prefix is checked for privacy/stability/etc. This caused issues in cross-crate scenarios because gensyms are lost in crate metadata (the `_` is a gensym). Fixes https://github.com/rust-lang/rust/issues/55811
2018-11-21resolve: Make "empty import canaries" invisible from other cratesVadim Petrochenkov-0/+11
2018-11-21Add a couple more testsVadim Petrochenkov-3/+33
2018-11-21Stabilize `extern_crate_item_prelude`Vadim Petrochenkov-7/+0
2018-11-18Fix rebaseVadim Petrochenkov-1/+1
2018-11-18Add a couple more tests + address review commentsVadim Petrochenkov-0/+91
2018-11-18resolve: Avoid sentence breaks in diagnosticsVadim Petrochenkov-5/+5
2018-11-18resolve: Tweak some articles in ambiguity diagnosticsVadim Petrochenkov-11/+11
2018-11-18resolve: Improve diagnostics for resolution ambiguitiesVadim Petrochenkov-87/+95
2018-11-07Removed `#[rustc_error]` from tests that are all `// compile-pass`.Felix S. Klock II-16/+4
I also added `// skip-codegen` to each one, to address potential concerns that this change would otherwise slow down our test suite spending time generating code for files that are really just meant to be checks of compiler diagnostics. (However, I will say: My preference is to not use `// skip-codegen` if one can avoid it. We can use all the testing of how we drive LLVM that we can get...) (Updated post rebase.)
2018-10-30resolve: Fix ICE in macro import error recoveryVadim Petrochenkov-0/+39
2018-10-28resolve: More precise spans for privacy errorsVadim Petrochenkov-4/+4
2018-10-28resolve: Absolute paths may be undetermined on 2018 editionVadim Petrochenkov-0/+18
due to macro-expanded `extern crate` items adding names to extern prelude.
2018-10-24Prohibit macro-expanded `extern crate` items shadowing crates passed with ↵Vadim Petrochenkov-2/+20
`--extern`
2018-10-24Feature gate extern prelude additions from `extern crate` itemsVadim Petrochenkov-2/+7
Fix rustdoc and fulldeps tests