| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Do not lose or reorder user-provided linker arguments
Linker arguments are potentially order-dependent, so the order in which `-C link-arg` and `-C link-args` options are passed to `rustc` should be preserved when they are passed further to the linker.
Also, multiple `-C link-args` options are now appended to each other rather than overwrite each other.
In other words, `-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f` is now passed as `"a" "b" "c" "d" "e" "f"` and not as `"d" "e" "a" "f"`.
Addresses https://github.com/rust-lang/rust/pull/70505#issuecomment-606780163.
|
|
|
|
|
|
* Adds either an MD5 or SHA1 hash to the debug info.
* Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
|
|
|
|
Add `-Z dump-mir-dataflow` flag for dumping dataflow results visualization
Previously, to visualize the results of a MIR dataflow pass, one had to add a `#[rustc_mir(borrowck_graphviz_postflow)]` attribute to functions of interest. However, there is no way to specify this attribute on closures and generators, so it was impossible to view results for these MIR bodies.
This PR adds a flag, `-Z dump-mir-dataflow`, which will output the dataflow results for any functions specified in `-Z dump-mir` to the output directory specified by `-Z dump-mir-dir`. This behavior is modeled on the `-Z dump-mir-graphviz` flag.
|
|
use is_empty() instead of len comparison (clippy::len_zero)
use if let instead of while let loop that never loops (clippy::never_loop)
remove redundant returns (clippy::needless_return)
remove redundant closures (clippy::redundant_closure)
use if let instead of match and wildcard pattern (clippy::single_match)
don't repeat field names redundantly (clippy::redundant_field_names)
|
|
|
|
|
|
|
|
|
|
Move arg/constraint partition check to validation & improve recovery
- In the first commit, we move the check rejecting e.g., `<'a, Item = u8, String>` from the parser into AST validation.
- We then use this to improve the code for parsing generic arguments.
- And we add recovery for e.g., `<Item = >` (missing), `<Item = 42>` (constant), and `<Item = 'a>` (lifetime).
This is also preparatory work for supporting https://github.com/rust-lang/rust/issues/70256.
r? @varkor
|
|
|
|
Specifically, remove both `-Z no_integrated_as` and
`TargetOptions::no_integrated_as`. The latter was only used for the
`msp430_none_elf` platform, for which it's no longer required.
|
|
r=michaelwoerister
Clean up debugging options
I found various sub-optimal things when I was looking at option handling.
|
|
normalize some imports & prefer direct ones
r? @Mark-Simulacrum
|
|
|
|
|
|
`-C incremental` was introduced over two years ago. `-Z incremental` was
kept for transitioning, but it's been long enough now that it should be
ok to remove it.
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #69251 (#[track_caller] in traits)
- #69880 (miri engine: turn error sanity checks into assertions)
- #70207 (Use getentropy(2) on macos)
- #70227 (Only display definition when suggesting a typo)
- #70236 (resolve: Avoid "self-confirming" import resolutions in one more case)
- #70248 (parser: simplify & remove unused field)
- #70249 (handle ConstKind::Unresolved after monomorphizing)
- #70269 (remove redundant closures (clippy::redundant_closure))
- #70270 (Clean up E0449 explanation)
Failed merges:
r? @ghost
|
|
|
|
|
|
|
|
Don't unwind when hitting the macro expansion recursion limit
This removes one use of `FatalError.raise()`.
r? @petrochenkov
|
|
|
|
|
|
Remove some imports to the rustc crate
- When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code).
- Use `rustc_session::` imports instead of `rustc::{session, lint}`.
r? @Zoxc
|
|
|
|
Don't use static crt by default when build proc-macro
Don't check value of `crt-static` when build proc-macro crates, since they are always built dynamically.
For more information, see https://github.com/rust-lang/cargo/issues/7563#issuecomment-591965320
I hope this will fix issues about compiling `proc_macro` crates on musl host without bring more issues.
Fix https://github.com/rust-lang/cargo/issues/7563
|
|
|
|
Use queries for the HIR map
r? @eddyb cc @michaelwoerister
|
|
ast: `Mac`/`Macro` -> `MacCall`
It's now obvious that these refer to macro calls rather than to macro definitions.
It's also a single name instead of two different names in different places.
`rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls.
cc https://github.com/rust-lang/rust/pull/63586#discussion_r314232513
r? @eddyb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #69697 (Add explanation for E0380)
- #69698 (Use associated constants of integer types)
- #69711 (Update macros.rs: fix documentation typo.)
- #69713 (more clippy cleanups)
- #69728 (Make link to `std::str` active)
- #69732 (Clean E0382 and E0384 explanations)
- #69736 (even more clippy cleanups)
- #69742 (Fixed a typo)
Failed merges:
r? @ghost
|
|
rename feature to const_eval_limit
|
|
anything.
For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
|
|
|
|
|
|
|
|
use char instead of &str for single char patterns
|
|
example:
let s: String = format!("hello").into();
|