@@ -1203,7 +1203,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
1203
1203
if filter_fn ( res) {
1204
1204
// create the path
1205
1205
let mut segms = path_segments. clone ( ) ;
1206
- if lookup_ident. span . rust_2018 ( ) {
1206
+ if lookup_ident. span . at_least_rust_2018 ( ) {
1207
1207
// crate-local absolute paths start with `crate::` in edition 2018
1208
1208
// FIXME: may also be stabilized for Rust 2015 (Issues #45477, #44660)
1209
1209
segms. insert ( 0 , ast:: PathSegment :: from_ident ( crate_name) ) ;
@@ -1268,7 +1268,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
1268
1268
path_segments. push ( ast:: PathSegment :: from_ident ( ident) ) ;
1269
1269
1270
1270
let is_extern_crate_that_also_appears_in_prelude =
1271
- name_binding. is_extern_crate ( ) && lookup_ident. span . rust_2018 ( ) ;
1271
+ name_binding. is_extern_crate ( ) && lookup_ident. span . at_least_rust_2018 ( ) ;
1272
1272
1273
1273
if !is_extern_crate_that_also_appears_in_prelude {
1274
1274
// add the module to the lookup
@@ -1315,7 +1315,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
1315
1315
& filter_fn,
1316
1316
) ;
1317
1317
1318
- if lookup_ident. span . rust_2018 ( ) {
1318
+ if lookup_ident. span . at_least_rust_2018 ( ) {
1319
1319
let extern_prelude_names = self . extern_prelude . clone ( ) ;
1320
1320
for ( ident, _) in extern_prelude_names. into_iter ( ) {
1321
1321
if ident. span . from_expansion ( ) {
@@ -1568,7 +1568,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
1568
1568
"consider adding an explicit import of `{ident}` to disambiguate"
1569
1569
) )
1570
1570
}
1571
- if b. is_extern_crate ( ) && ident. span . rust_2018 ( ) {
1571
+ if b. is_extern_crate ( ) && ident. span . at_least_rust_2018 ( ) {
1572
1572
help_msgs. push ( format ! ( "use `::{ident}` to refer to this {thing} unambiguously" ) )
1573
1573
}
1574
1574
match misc {
@@ -1973,7 +1973,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
1973
1973
if fst. ident . name == kw:: PathRoot && !snd. ident . is_path_segment_keyword ( ) => { }
1974
1974
// `ident::...` on 2018.
1975
1975
( Some ( fst) , _)
1976
- if fst. ident . span . rust_2018 ( ) && !fst. ident . is_path_segment_keyword ( ) =>
1976
+ if fst. ident . span . at_least_rust_2018 ( ) && !fst. ident . is_path_segment_keyword ( ) =>
1977
1977
{
1978
1978
// Insert a placeholder that's later replaced by `self`/`super`/etc.
1979
1979
path. insert ( 0 , Segment :: from_ident ( Ident :: empty ( ) ) ) ;
0 commit comments