| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Update Clippy
Fixes #67941
r? @ghost
|
|
|
|
Standard library support for riscv64gc-unknown-linux-gnu
Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support.
r? @alexcrichton
|
|
Nix `rustc_hir` reexports in rustc::hir
r? @Zoxc cc @Mark-Simulacrum
|
|
Use Self instead of $type
r? @Dylan-DPC
|
|
macros: typo fix
spotted while reviewing the todo!macro docs
|
|
Silence `TooGeneric` error
This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.
Fixes https://github.com/rust-lang/rust/issues/66962.
r? @eddyb
|
|
Use `as_deref()` to replace `as_ref().map(...)`
Suggested by @lzutao
|
|
change remove to have a PartialEq bound
Addresses [comment](https://github.com/rust-lang/rust/pull/67727#issuecomment-570660301).
References #40062
r? @Amanieu
|
|
Fix ICE involving calling `Instance.ty` during const evaluation
Fixes #67639
`Instance.ty` assumes that we are in a fully monomorphic context (e.g.
codegen), and can therefore use an empty `ParamEnv` when performing
normalization. Howver, the MIR constant evaluator code ends up calling
`Instance.ty` as a result of us attemptign to 'speculatively'
const-evaluate generic functions during const propagation.
As a result,
we may end up with projections involving type parameters
(e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize.
Normalization expects us to have proper predicates in the `ParamEnv` for
such projections, and will ICE if we don't.
This commit adds a new method `Instance.ty_env`, which takes a
`ParamEnv` for use during normalization. The MIR const-evaluator code is
changed to use this method, passing in the proper `ParamEnv` for the
context at hand.
|
|
|
|
spotted while reviewing the todo!macro docs
|
|
buffer lexer errors in rustdoc syntax checking
The code isn't ideal (I really would like to display the errors inline), but this at least gets us to where we were before #63017.
|
|
|
|
This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.
|
|
submodules: update rls from fed7a31 to 7010eee
Changes:
````
Update Clippy
Update cargo.
Correct two links to the json-error-emitter
````
Fixes #67708
|
|
|
|
|
|
|
|
|
|
Co-Authored-By: Wesley Wiser <wwiser@gmail.com>
|
|
Fixes #67639
`Instance.ty` assumes that we are in a fully monomorphic context (e.g.
codegen), and can therefore use an empty `ParamEnv` when performing
normalization. Howver, the MIR constant evaluator code ends up calling
`Instance.ty` as a result of us attemptign to 'speculatively'
const-evaluate generic functions during const propagation.
As a result,
we may end up with projections involving type parameters
(e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize.
Normalization expects us to have proper predicates in the `ParamEnv` for
such projections, and will ICE if we don't.
This commit adds a new method `Instance.ty_env`, which takes a
`ParamEnv` for use during normalization. The MIR const-evaluator code is
changed to use this method, passing in the proper `ParamEnv` for the
context at hand.
|
|
Rollup of 5 pull requests
Successful merges:
- #67818 (rustdoc: Avoid panic when parsing codeblocks for playground links)
- #67845 (Also remove const-hack for abs)
- #67879 (Remove negative number check from float sqrt)
- #67881 (Add backticks to various diagnostics)
- #67882 (remove bespoke flock bindings)
Failed merges:
r? @ghost
|
|
remove bespoke flock bindings
Replaces some `struct flock` definitions with the definition from `libc`.
|
|
Add backticks to various diagnostics
|
|
Remove negative number check from float sqrt
It hasn't been UB to pass negative numbers to sqrt since https://reviews.llvm.org/D28797 which was included in LLVM 5.
|
|
Also remove const-hack for abs
Closes #67842.
r? @oli-obk
|
|
r=GuillaumeGomez
rustdoc: Avoid panic when parsing codeblocks for playground links
`make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally.
Fixes #63016
r? @GuillaumeGomez
|
|
Suggested by @lzutao
|
|
Update Clippy
Fixes #67859
r? @oli-obk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use self profile infrastructure for -Z time and -Z time-passes
There's no longer indentation for -Z time and -Z time-passes and duplicate timers between self profiling and -Z time-passes have been removed.
r? @wesleywiser
|
|
|
|
perf: Don't recurse into types that do not need normalizing
A bit speculative at this stage but profiling shows that type folding
takes up a substantial amount of time during normalization which may
indicate that many types may be folded despite there being nothing to
normalize
|
|
|
|
|
|
|
|
It hasn't been UB to pass negative numbers to sqrt since https://reviews.llvm.org/D28797 which was included in LLVM 5.
|
|
|
|
Extract `rustc_hir` out of `rustc`
The new crate contains:
```rust
pub mod def;
pub mod def_id;
mod hir;
pub mod hir_id;
pub mod itemlikevisit;
pub mod pat_util;
pub mod print;
mod stable_hash_impls;
pub use hir::*;
pub use hir_id::*;
pub use stable_hash_impls::HashStableContext;
```
Remains to be done in follow-up PRs:
- Move `rustc::hir::map` into `rustc_hir_map` -- this has to be a separate crate due to the `dep_graph` (blocked on https://github.com/rust-lang/rust/pull/67761).
- Move references to `rustc::hir` to `rustc_hir` where possible.
cc https://github.com/rust-lang/rust/issues/65031
r? @Zoxc
|
|
Changes:
````
rustup https://github.com/rust-lang/rust/pull/67853
deps: update clippy
Update Clippy
Update cargo.
Correct two links to the json-error-emitter
````
Fixes #67708
|
|
`make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally.
|
|
|
|
|