Modified E0220 to show error messages for more general cases
This PR extends `E0220`'s description to explain more cases.
Refer to [#34342](https://github.com/rust-lang/rust/pull/34342) for more.
r? @GuillaumeGomez
Fix macro hygiene regression
The regression was caused by #32923, which is currently in beta.
The following is an example of regressed code:
```rust
fn main() {
let x = 0;
macro_rules! foo { () => {
println!("{}", x); // prints `0` on stable and after this PR, prints `1` on beta and nightly
} }
let x = 1;
foo!();
}
```
For code to regress, the following is necessary (but not sufficient):
- There must be a local variable before a macro in a block, and the macro must use the variable.
- There must be a second local variable with the same name after the macro.
- The macro must be invoked in a statement position after the second local variable.
For example, if the `let x = 0;` from the breaking example were commented out, it would (correctly) not compile on beta/nightly. If the semicolon were removed from `foo!();`, it would (correctly) print `0` on beta and nightly.
r? @nrc
rustdoc: Fix a couple of issues with src links to external crates
- src links/redirects to extern fn from another crate had an extra '/'.
- src links to `pub use` of a crate module had an extra '/'.
- src links to renamed reexports from another crate used the new name
for the link but should use the original name.
Fixes: #34274
configure: Remove clang version checks
We no C++ and an incredibly small amount of C code as part of the build, so
there's not really much need for us to strictly check the version of compilers
as we're not really stressing anything. LLVM is a pretty huge chunk of C++ but
it should be the responsibility of LLVM to ensure that it can build with a
particular clang/gcc version, not ours (as this logic changes over time).
These version checks seem to basically just by us a regular stream of PRs every
six weeks or so when a new version is releases, so they're not really buying us
much. As a result, remove them and we can add then back piecemeal perhaps as a
blacklist if we really need to.
Fix overflow error in thread::sleep
Fixes#34330
I added a test to have a more clear error inside the function. Since `time_t` is `i64` and we expect `u64`, maybe we should changed the awaited type?
Add custom message parameter to `assert_eq!`
`assert!` macro accepts a custom message parameter and it's sometimes useful. But `assert_eq!` doesn't have it and users need to use `assert!` instead of `assert_eq!` when they want to output a custom message even if the assertion just compares two values. This pull request will resolve those cases.
Improves organization of driver includes.
Minor reordering of use's in librustc_driver/driver.rs
- puts her::lower::lower_create with it's siblings
- groups link and write of rustc_trans::back
book: Fixed links in book/compiler-plugins.md
Updated the links referring to roman_numerals.rs and lint_plugin_test.rs. Went from src/test/auxiliary/ to src/test/run-pass-fulldeps/auxiliary/.