| Age | Commit message (Collapse) | Author | Lines |
|
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();
|
|
|
|
|
|
|
|
parse: fuse associated and extern items up to defaultness
Language changes:
- The grammar of extern `type` aliases is unified with associated ones, and becomes:
```rust
TypeItem = "type" ident generics {":" bounds}? where_clause {"=" type}? ";" ;
```
Semantic restrictions (`ast_validation`) are added to forbid any parameters in `generics`, any bounds in `bounds`, and any predicates in `where_clause`, as well as the presence of a type expression (`= u8`).
(Work still remains to fuse this with free `type` aliases, but this can be done later.)
- The grammar of constants and static items (free, associated, and extern) now permits the absence of an expression, and becomes:
```rust
GlobalItem = {"const" {ident | "_"} | "static" "mut"? ident} {"=" expr}? ";" ;
```
- A semantic restriction is added to enforce the presence of the expression (the body).
- A semantic restriction is added to reject `const _` in associated contexts.
Together, these changes allow us to fuse the grammar of associated items and extern items up to `default`ness which is the main goal of the PR.
-----------------------
We are now very close to fully fusing the entirely of item parsing and their ASTs. To progress further, we must make a decision: should we parse e.g. `default use foo::bar;` and whatnot? Accepting that is likely easiest from a parsing perspective, as it does not require using look-ahead, but it is perhaps not too onerous to only accept it for `fn`s (and all their various qualifiers), `const`s, `static`s, and `type`s.
r? @petrochenkov
|
|
|
|
|
|
|
|
|
|
Same idea for `Unsafety` & use new span for better diagnostics.
|
|
[experiment] Support linking from a .rlink file
Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file.
Part of Issue #64191
|
|
Remove unused feature gates
I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
|
|
Flag `-Z no-link` was previously introduced, which allows creating
an `.rlink` file to perform compilation without linking.
This change enables linking from an `.rlink` file.
|
|
|
|
|
|
remove redundant imports (clippy::single_component_path_imports)
|
|
Split `join_codegen_and_link()` into two steps
`join_codegen_and_link()` is split to `join_codegen()` and `link()`.
|
|
`join_codegen_and_link()` is split to `join_codegen()` and `link()`.
|
|
|
|
Use BufWriter for emitting MIR
I noticed that `--emit=mir` takes long time on a large crate. https://github.com/rust-lang/rust/pull/64344 seem to have fixed `-Zdump-mir`, but not `--emit=mir`.
|
|
|
|
|
|
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
|
|
For now, this is all the crate contains, but more
attribute logic & types will be moved there over time.
|
|
|
|
|
|
|
|
This commit reduces the size of `Nonterminal` from a whopping 240 bytes
to 72 bytes (on x86-64), which gets it below the `memcpy` threshold.
It also removes some impedance mismatches with `Annotatable`, which
already uses `P` for these variants.
|
|
|
|
Implement Lift using interners instead of in_arena
r? @eddyb
cc @cjgillot
|
|
Move some queries from rustc::ty to librustc_ty.
cc #65031
|
|
use winapi for non-stdlib Windows bindings
|
|
|
|
|
|
Split MIR building into its own crate
This moves `rustc_mir::{build, hair, lints}` to `rustc_mir_build`.
The new crate only has a `provide` function as it's public API.
Based on #67898
cc @Centril @rust-lang/compiler
r? @oli-obk
|
|
|
|
|
|
|
|
|
|
Also do some cleanup of the interface.
|
|
Add some missing timers
Based on https://github.com/rust-lang/rust/pull/67988
r? @wesleywiser
|
|
|
|
|
|
|