rust/compiler/rustc_ast/src
Aaron Hill 9e7ef659e1
Account for version number in NtIdent hack
Issue #74616 tracks a backwards-compatibility hack for certain macros.
This has is implemented by hard-coding the filenames and macro names of
certain code that we want to continue to compile.

However, the initial implementation of the hack was based on the
directory structure when building the crate from its repository (e.g.
`js-sys/src/lib.rs`). When the crate is build as a dependency, it will
include a version number from the clone from the cargo registry (e.g.
`js-sys-0.3.17/src/lib.rs`), which would fail the check.

This commit modifies the backwards-compatibility hack to check that
desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the
proper part of the path.

See https://github.com/rust-lang/rust/issues/76070#issuecomment-687215646
for more details.
2020-09-04 13:10:23 -04:00
..
ast mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
attr Factor out StmtKind::MacCall fields into MacCallStmt struct 2020-08-30 18:38:53 -04:00
expand mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
util mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
ast.rs Factor out StmtKind::MacCall fields into MacCallStmt struct 2020-08-30 18:38:53 -04:00
crate_disambiguator.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
entry.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lib.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
mut_visit.rs Factor out StmtKind::MacCall fields into MacCallStmt struct 2020-08-30 18:38:53 -04:00
node_id.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
ptr.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
token.rs Account for version number in NtIdent hack 2020-09-04 13:10:23 -04:00
tokenstream.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
visit.rs Factor out StmtKind::MacCall fields into MacCallStmt struct 2020-08-30 18:38:53 -04:00