summary refs log tree commit diff
path: root/src/test/ui/rust-2018
AgeCommit message (Collapse)AuthorLines
2019-03-30Replace REDUNDANT_IMPORT with UNUSED_IMPORTSFabian Drinck-56/+10
2019-03-30Edit ui testsFabian Drinck-0/+1
2019-03-30Bless testsFabian Drinck-0/+46
2019-03-23Tweak spans for E0599Esteban Küber-3/+1
2019-03-16resolve: Account for new importable entitiesVadim Petrochenkov-0/+42
2019-03-11Update testsVadim Petrochenkov-40/+40
2019-03-09use structured suggestions for E0432Andy Russell-4/+7
2019-01-12Fix a hole in generic parameter import future-proofingVadim Petrochenkov-2/+8
Add some tests for buggy derive helpers
2019-01-12Stabilize `uniform_paths`Vadim Petrochenkov-79/+24
2019-01-12resolve: Prohibit use of imported tool modulesVadim Petrochenkov-6/+44
2019-01-12resolve: Prohibit use of imported non-macro attributesVadim Petrochenkov-4/+23
2019-01-12resolve: Assign `pub` and `pub(crate)` visibilities to `macro_rules` itemsVadim Petrochenkov-40/+13
2018-12-31Address review commentsEsteban Küber-1/+1
- Suggest raw ident escaping in all editions - Keep primary label in all cases
2018-12-31Suggest using raw identifiers in 2018 edition when using keywordsEsteban Küber-1/+5
2018-12-29Auto merge of #56225 - alexreg:type_alias_enum_variants, r=petrochenkovbors-2/+4
Implement RFC 2338, "Type alias enum variants" This PR implements [RFC 2338](https://github.com/rust-lang/rfcs/pull/2338), allowing one to write code like the following. ```rust #![feature(type_alias_enum_variants)] enum Foo { Bar(i32), Baz { i: i32 }, } type Alias = Foo; fn main() { let t = Alias::Bar(0); let t = Alias::Baz { i: 0 }; match t { Alias::Bar(_i) => {} Alias::Baz { i: _i } => {} } } ``` Since `Self` can be considered a type alias in this context, it also enables using `Self::Variant` as both a constructor and pattern. Fixes issues #56199 and #56611. N.B., after discussing the syntax for type arguments on enum variants with @petrochenkov and @eddyb (there are also a few comments on the [tracking issue](https://github.com/rust-lang/rust/issues/49683)), the consensus seems to be treat the syntax as follows, which ought to be backwards-compatible. ```rust Option::<u8>::None; // OK Option::None::<u8>; // OK, but lint in near future (hard error next edition?) Alias::<u8>::None; // OK Alias::None::<u8>; // Error ``` I do not know if this will need an FCP, but let's start one if so.
2018-12-29Auto merge of #57181 - petrochenkov:impice3, r=estebankbors-0/+12
resolve: Fix another ICE in import validation Imports are allowed to have ambiguous resolutions as long as all of them have same `Def`. As it turned out, it's possible for different `Module`s to have same `Def` when `extern crate` items are involved. Fixes https://github.com/rust-lang/rust/issues/56596
2018-12-29resolve: Fix another ICE in import validationVadim Petrochenkov-0/+12
2018-12-28resolve: Fix an ICE in import validationVadim Petrochenkov-0/+33
2018-12-26Fixed more tests.Alexander Regueiro-2/+4
2018-12-25Remove licensesMark Rousskov-690/+131
2018-12-24make non_camel_case_types an early lintAndy Russell-34/+46
2018-12-17Stabilize `underscore_imports`Vadim Petrochenkov-2/+2
2018-12-06Rollup merge of #56426 - petrochenkov:syntweak, r=nikomatsakisPietro Albini-4/+4
libsyntax_pos: A few tweaks
2018-12-04Update testsOliver Scherer-10/+10
2018-12-04syntax: `dyn` is a used keyword nowVadim Petrochenkov-4/+4
2018-11-30tests: use `force-host` and `no-prefer-dynamic` in all proc_macro tests.Eduard-Mihai Burtescu-0/+3
2018-11-30tests: move all proc_macro tests from -fulldeps.Eduard-Mihai Burtescu-0/+144
2018-11-28resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`Vadim Petrochenkov-0/+21
2018-11-27resolve: Suggest `crate::` for resolving ambiguities when appropriateVadim Petrochenkov-6/+6
More precise spans for ambiguities from macros
2018-11-27Remove duplicate tests for uniform pathsVadim Petrochenkov-312/+0
2018-11-18Add a couple more tests + address review commentsVadim Petrochenkov-4/+63
2018-11-18resolve: Future-proof against imports referring to local variables and ↵Vadim Petrochenkov-0/+99
generic parameters
2018-11-18resolve: Avoid sentence breaks in diagnosticsVadim Petrochenkov-5/+5
2018-11-18resolve: Reintroduce feature gate for uniform paths in importsVadim Petrochenkov-42/+38
2018-11-18Fix ICEs from imports of items not defined in modulesVadim Petrochenkov-0/+154
2018-11-18resolve: Tweak some articles in ambiguity diagnosticsVadim Petrochenkov-22/+22
2018-11-18resolve: Recover "did you mean" suggestions in importsVadim Petrochenkov-8/+2
2018-11-18resolve: Check resolution consistency for import paths and multi-segment ↵Vadim Petrochenkov-54/+130
macro paths
2018-11-18resolve: Resolve single-segment imports using in-scope resolution on 2018 ↵Vadim Petrochenkov-0/+12
edition
2018-11-18resolve: Improve diagnostics for resolution ambiguitiesVadim Petrochenkov-72/+116
2018-10-28Add note linking to Rust 2018 path semantics docs.David Wood-0/+2
This commit extends existing path suggestions to link to documentation on the changed semantics of `use` in Rust 2018.
2018-10-23fix typos in various placesMatthias Krüger-2/+2
2018-10-20pick a reference issue for absolute-paths future incompatibility infoZack M. Davis-16/+16
It would be kind of embarrassing to ship with the "issue TBD" message!
2018-10-13resolve: Scale back hard-coded extern prelude additionsVadim Petrochenkov-1/+1
2018-10-03Update tests to demonstrate 2015 behaviour.David Wood-4/+49
Adds a test to demonstrate behaviour of suggestions in the 2015 edition.
2018-10-03Add suggestions for unresolved imports.David Wood-1/+68
This commit adds suggestions for unresolved imports in the cases where there could be a missing `crate::`, `super::`, `self::` or a missing external crate name before an import.
2018-10-02Add `crate::` to trait suggestions in Rust 2018.David Wood-0/+99
In the 2018 edition, when suggesting traits to import that implement a given method that is being invoked, suggestions will now include the `crate::` prefix if the suggested trait is local to the current crate.
2018-10-01Rollup merge of #54488 - zackmdavis:and_the_case_of_the_unused_crate, r=estebankkennytm-0/+67
in which we include attributes in unused `extern crate` suggestion spans ![unused_extern](https://user-images.githubusercontent.com/1076988/45921698-50243e80-be6f-11e8-930a-7b2a33b4935c.png) Resolves #54400. r? @estebank
2018-09-30Auto merge of #54650 - eddyb:no-extern's-land, r=alexcrichtonbors-4/+16
Don't lint non-extern-prelude extern crate's in Rust 2018. Fixes #54381 by silencing the lint telling users to remove `extern crate` when `use` doesn't work. r? @alexcrichton cc @petrochenkov @nikomatsakis @Centril
2018-09-28rustc_typeck: don't lint non-extern-prelude extern crate's in Rust 2018.Eduard-Mihai Burtescu-4/+16