Skip to content

Commit 56c04ea

Browse files
committed
Delete no_hygiene config for rustc older than 1.45
1 parent 467a0b4 commit 56c04ea

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

build.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ fn main() {
5858
println!("cargo:rustc-cfg=span_locations");
5959
}
6060

61-
if version.minor < 45 {
62-
println!("cargo:rustc-cfg=no_hygiene");
63-
}
64-
6561
if version.minor < 47 {
6662
println!("cargo:rustc-cfg=no_ident_new_raw");
6763
}

src/fallback.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ impl Span {
463463
Span { lo: 0, hi: 0 }
464464
}
465465

466-
#[cfg(not(no_hygiene))]
467466
pub fn mixed_site() -> Self {
468467
Span::call_site()
469468
}

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,6 @@ impl Span {
400400
/// The span located at the invocation of the procedural macro, but with
401401
/// local variables, labels, and `$crate` resolved at the definition site
402402
/// of the macro. This is the same hygiene behavior as `macro_rules`.
403-
///
404-
/// This function requires Rust 1.45 or later.
405-
#[cfg(not(no_hygiene))]
406403
pub fn mixed_site() -> Self {
407404
Span::_new(imp::Span::mixed_site())
408405
}

src/wrapper.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ impl Span {
397397
}
398398
}
399399

400-
#[cfg(not(no_hygiene))]
401400
pub fn mixed_site() -> Self {
402401
if inside_proc_macro() {
403402
Span::Compiler(proc_macro::Span::mixed_site())
@@ -417,27 +416,15 @@ impl Span {
417416

418417
pub fn resolved_at(&self, other: Span) -> Span {
419418
match (self, other) {
420-
#[cfg(not(no_hygiene))]
421419
(Span::Compiler(a), Span::Compiler(b)) => Span::Compiler(a.resolved_at(b)),
422-
423-
// Name resolution affects semantics, but location is only cosmetic
424-
#[cfg(no_hygiene)]
425-
(Span::Compiler(_), Span::Compiler(_)) => other,
426-
427420
(Span::Fallback(a), Span::Fallback(b)) => Span::Fallback(a.resolved_at(b)),
428421
_ => mismatch(),
429422
}
430423
}
431424

432425
pub fn located_at(&self, other: Span) -> Span {
433426
match (self, other) {
434-
#[cfg(not(no_hygiene))]
435427
(Span::Compiler(a), Span::Compiler(b)) => Span::Compiler(a.located_at(b)),
436-
437-
// Name resolution affects semantics, but location is only cosmetic
438-
#[cfg(no_hygiene)]
439-
(Span::Compiler(_), Span::Compiler(_)) => *self,
440-
441428
(Span::Fallback(a), Span::Fallback(b)) => Span::Fallback(a.located_at(b)),
442429
_ => mismatch(),
443430
}

0 commit comments

Comments
 (0)