]> git.lizzy.rs Git - rust.git/commit
Extend `proc_macro_back_compat` lint to `js-sys`
authorAaron Hill <aa1ronham@gmail.com>
Fri, 19 Mar 2021 15:10:01 +0000 (11:10 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Fri, 19 Mar 2021 18:40:20 +0000 (14:40 -0400)
commitf6a35d7df276bdc939746786f7d43b05e60f7dcd
tree9ccbbca1c7cd326129c1fc91de3257c147a73e7d
parent9f4bc3ead43a57783d8abea2fa6931a6736f3490
Extend `proc_macro_back_compat` lint to `js-sys`

With this PR, we now lint for all cases where we perform some kind of
proc-macro back-compat hack.

The `js-sys` had an internal fix made to properly handle
`None`-delimited groups, so we need to manually check the version in the
filename. As a result, we no longer apply the back-compat hack to cases
where the version number is missing file the file path. This should not
affect any users of the `crates.io` crate.
compiler/rustc_expand/src/proc_macro_server.rs
src/test/ui/proc-macro/group-compat-hack/group-compat-hack.rs
src/test/ui/proc-macro/group-compat-hack/group-compat-hack.stderr
src/test/ui/proc-macro/group-compat-hack/group-compat-hack.stdout
src/test/ui/proc-macro/group-compat-hack/js-sys-0.3.40/src/lib.rs [new file with mode: 0644]