| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Remove CollectItemTypesVisitor
I always felt like we were very unnecessarily walking the HIR, let's see if perf agrees
There is lots to ~~improve~~ consolidate further here, as we still have 3 item wfchecks:
* check_item (matching on the hir::ItemKind)
* actually doing trait solver based checks (by using HIR spans)
* lower_item (matching on the hir::ItemKind after loading it again??)
* just ensure_ok-ing a bunch of queries
* check_item_type (matching on DefKind)
* some type based checks, mostly ensure_ok-ing a bunch of queries
fixes rust-lang/rust#121429
|
|
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#140560 (Allow `#![doc(test(attr(..)))]` everywhere)
- rust-lang/rust#141447 (Document representation of `Option<unsafe fn()>`)
- rust-lang/rust#141661 (Make the `dangerous_implicit_autorefs` lint deny-by-default)
- rust-lang/rust#142065 (Stabilize `const_eq_ignore_ascii_case`)
- rust-lang/rust#142116 (Fix bootstrap tracing imports)
- rust-lang/rust#142126 (Treat normalizing consts like normalizing types in deeply normalize)
- rust-lang/rust#142140 (compiler: Sort and doc ExternAbi variants)
- rust-lang/rust#142148 (compiler: Treat ForceWarning as a Warning for diagnostic level)
- rust-lang/rust#142154 (get rid of spurious cfg(bootstrap))
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
get rid of spurious cfg(bootstrap)
r? ```@oli-obk```
|
|
compiler: Treat ForceWarning as a Warning for diagnostic level
This silences an ICE.
No idea if this is the correct solution though tbh.
Fixes rust-lang/rust#142144
|
|
compiler: Sort and doc ExternAbi variants
My personal brainworms found this ordering made the most sense while writing the CanonAbi PR. It is *an* ordering, at least, unlike the current mess. There has been no particular reason for the previous order ever since rust-lang/rust#136901, despite the comment I delete here. I just didn't change it.
Because I feel weird just fussing with variant ordering in the source definition, I also documented a bunch to the best of my ability.
|
|
Treat normalizing consts like normalizing types in deeply normalize
...so that we don't end up putting a top-level normalizes-to goal in the fulfillment context, which ICEs. This basically just models the normalize-const code off of the normalize-ty code above it, which uses an alias-relate goal instead.
Fixes rust-lang/rust#140571
r? lcnr
|
|
Fix bootstrap tracing imports
|
|
paolobarbolini:stabilize-const_eq_ignore_ascii_case, r=Mark-Simulacrum
Stabilize `const_eq_ignore_ascii_case`
Tracking issue: rust-lang/rust#131719
Closes rust-lang/rust#131719
FCP Completed: https://github.com/rust-lang/rust/issues/131719#issuecomment-2941829167
|
|
Make the `dangerous_implicit_autorefs` lint deny-by-default
I intended for the `dangerous_implicit_autorefs` lint to be deny-by-default, the [T-lang nomination comment](https://github.com/rust-lang/rust/pull/123239#issuecomment-2727551097) even clearly mentioned deny-by-default, but somehow I and other missed that it is only warn-by-default.
I think the lint should still be deny-by-default as the implicit aliasing requirements can be quite dangerous.
In any-case, opening this PR for T-lang awareness.
`@rustbot` label +I-lang-nominated +T-lang
r? `@traviscross`
|
|
Document representation of `Option<unsafe fn()>`
https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Option.20Layout.20with.20.60fn.60.20pointers/with/520055652
|
|
Allow `#![doc(test(attr(..)))]` everywhere
This PR adds the ability to specify [`#![doc(test(attr(..)))]`](https://doc.rust-lang.org/nightly/rustdoc/write-documentation/the-doc-attribute.html#testattr) ~~at module level~~ everywhere in addition to allowing it at crate-root.
This is motivated by a recent PR #140323 (by ````@tgross35)```` where we have to duplicate 2 attributes to every single `f16` and `f128` doctests, by allowing `#![doc(test(attr(..)))]` at module level (and everywhere else) we can omit them entirely and just have (in both module):
```rust
#![doc(test(attr(feature(cfg_target_has_reliable_f16_f128))))]
#![doc(test(attr(expect(internal_features))))]
```
Those new attributes are appended to the one found at crate-root or at a previous module. Those "global" attributes are compatible with merged doctests (they already were before).
Given the small addition that this is, I'm proposing to insta-stabilize it, but I can feature-gate it if preferred.
Best reviewed commit by commit.
r? ````@GuillaumeGomez````
|
|
Move coroutine_by_move_body_def_id into the big check_crate body owner loop
This avoids starting a parallel loop in sequence and instead runs all the queries for a specific DefId together.
|
|
Clear nested candidates in select if certainty is yes
Proving these goals is redundant.
|
|
Update stdarch submodule
Updates the stdarch submodule.
## Merged PRs
- rust-lang/stdarch#1797
- rust-lang/stdarch#1758
- rust-lang/stdarch#1798
- rust-lang/stdarch#1811
- rust-lang/stdarch#1810
- rust-lang/stdarch#1807
- rust-lang/stdarch#1806
- rust-lang/stdarch#1812
- rust-lang/stdarch#1795
- rust-lang/stdarch#1796
- rust-lang/stdarch#1813
- rust-lang/stdarch#1816
- rust-lang/stdarch#1818
- rust-lang/stdarch#1820
- rust-lang/stdarch#1819
r? `@Amanieu`
`@rustbot` label T-libs-api
Closes rust-lang/rust#111137
|
|
|
|
bootstrap: Remove `rustc_snapshot_libdir` from PATH in one more place
Same as https://github.com/rust-lang/rust/pull/141657 but in a different part of the build system, with the same goal of addressing [#t-infra/bootstrap > Build broken in MSYS2 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Build.20broken.20in.20MSYS2/near/520709527).
It seems to work on windows-{gnu,msvc} and linux-gnu at least.
r? jieyouxu
|
|
This silences an ICE.
|
|
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#137992 (Stabilise `os_string_pathbuf_leak`)
- rust-lang/rust#141558 (Limit the size of cgu names when using the `-Zhuman-readable-cgu-name…)
- rust-lang/rust#141797 (compiler: set Apple frame pointers by architecture)
- rust-lang/rust#141857 (coretests: move float tests from num to floats module and use a more flexible macro to generate them)
- rust-lang/rust#142045 (Make obligation cause code suggestions verbose)
- rust-lang/rust#142076 (Check documentation of bootstrap in PR CI)
- rust-lang/rust#142110 (Add solaris targets to build-manifest)
- rust-lang/rust#142131 (Make cast suggestions verbose)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Make cast suggestions verbose
```
error[E0604]: only `u8` can be cast as `char`, not `u32`
--> $DIR/E0604.rs:2:5
|
LL | 1u32 as char;
| ^^^^^^^^^^^^ invalid cast
|
help: try `char::from_u32` instead
|
LL - 1u32 as char;
LL + char::from_u32(1u32);
|
```
```
error[E0620]: cast to unsized type: `&[u8]` as `[char]`
--> $DIR/cast-to-slice.rs:6:5
|
LL | arr as [char];
| ^^^^^^^^^^^^^
|
help: try casting to a reference instead
|
LL | arr as &[char];
| +
```
```
error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send`
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5
|
LL | Box::new(1) as dyn Send;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
help: you can cast to a `Box` instead
|
LL | Box::new(1) as Box<dyn Send>;
| ++++ +
```
Part of rust-lang/rust#141973.
|
|
Add solaris targets to build-manifest
this is follow up for: https://github.com/rust-lang/rust/pull/138699
|
|
Check documentation of bootstrap in PR CI
It's annoying when wrong doc comments in bootstrap [break](https://github.com/rust-lang/rust/pull/141272#issuecomment-2943614152) `auto` CI. This has happened a few times recently, and documenting bootstrap with the stage0 compiler should be pretty quick, so let's add it to PR CI.
r? ``@marcoieni``
|
|
r=compiler-errors
Make obligation cause code suggestions verbose
```
error[E0277]: `()` is not a future
--> $DIR/unnecessary-await.rs:28:10
|
LL | e!().await;
| ^^^^^ `()` is not a future
|
= help: the trait `Future` is not implemented for `()`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
help: remove the `.await`
|
LL - e!().await;
LL + e!();
|
```
```
error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/const-fn-in-vec.rs:1:47
|
LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5];
| ^^^^ the trait `Copy` is not implemented for `String`
|
= note: required for `Option<String>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
help: create an inline `const` block
|
LL | static _MAYBE_STRINGS: [Option<String>; 5] = [const { None }; 5];
| +++++++ +
```
Part of rust-lang/rust#141973
|
|
coretests: move float tests from num to floats module and use a more flexible macro to generate them
This makes some progress on https://github.com/rust-lang/rust/issues/141726 by moving the float tests in `num` to `floats` and using a newer, more flexible macro to generate them. We also newly run these tests on f16 and f128 in const, and at runtime in Miri and for hosts where that works well enough.
I didn't yet deduplicate any tests or port the existing `floats::f*` tests to the macro, that can happen in a future PR.
try-job: x86_64-gnu-aux
|
|
workingjubilee:apple-likes-frame-pointers-but-not-that-much, r=madsmtm
compiler: set Apple frame pointers by architecture
All Apple targets stop overriding this configuration and instead use the default base of FramePointer::NonLeaf, which means some Apples will have less frame pointers in leaf functions.
r? ``@madsmtm``
cc ``@thomcc``
|
|
Limit the size of cgu names when using the `-Zhuman-readable-cgu-name…
…s` option
Prior to this change, cgu names could be generated which would result in filenames longer than the limit imposed by the OS.
|
|
r=dtolnay
Stabilise `os_string_pathbuf_leak`
This PR stabilises `#[feature(os_string_pathbuf_leak)]`, which defines 2 new methods in the std:
```rs
impl OsString {
pub fn leak<'a>(self) -> &'a mut OsStr;
}
impl PathBuf {
pub fn leak<'a>(self) -> &'a mut Path;
}
```
ACP: https://github.com/rust-lang/libs-team/issues/389
Tracking issue: https://github.com/rust-lang/rust/issues/125965
Implementation: https://github.com/rust-lang/rust/pull/125966
|
|
|
|
|
|
Fix `create-docs-artifacts.sh` with new bors
The slashes in the branch name (`automation/bors/try`) were causing issues for this script (https://github.com/rust-lang/rust/actions/runs/15391908130/job/43303193243).
r? `@marcoieni`
try-job: `mingw-check*`
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#140418 (Reexport types from `c_size_t` in `std`)
- rust-lang/rust#141471 (unsafe keyword docs: emphasize that an unsafe fn in a trait does not get to choose its safety contract)
- rust-lang/rust#141603 (Reduce `ast::ptr::P` to a typedef of `Box`)
- rust-lang/rust#142043 (Verbose suggestion to make param `const`)
- rust-lang/rust#142086 (duduplicate more AST visitor methods)
- rust-lang/rust#142103 (Update `InterpCx::project_field` to take `FieldIdx`)
- rust-lang/rust#142105 (remove extraneous text)
- rust-lang/rust#142112 (fix typo)
- rust-lang/rust#142113 (Reduce confusion of some drop order tests)
- rust-lang/rust#142114 (Compute number of digits instead of relying on constant value for u128 display code)
- rust-lang/rust#142118 (rustc_lexer: typo fix + small cleanups)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustc_lexer: typo fix + small cleanups
|
|
Compute number of digits instead of relying on constant value for u128 display code
As discussed in https://github.com/rust-lang/rust/pull/142098/files#r2132084991, the code should reuse the same logic as the rest of file instead of using a constant value.
r? `@tamird`
|
|
Reduce confusion of some drop order tests
In addition to adhering to normal Rust casing idioms, I ran `rustfmt`.
Closes rust-lang/rust#141604
r? `@jieyouxu`
|
|
fix typo
|
|
remove extraneous text
|
|
Update `InterpCx::project_field` to take `FieldIdx`
As suggested by Ralf in https://github.com/rust-lang/rust/pull/142005#discussion_r2125839015
|
|
duduplicate more AST visitor methods
r? oli-obk
|
|
Verbose suggestion to make param `const`
```
error[E0747]: type provided when a constant was expected
--> $DIR/invalid-const-arguments.rs:10:19
|
LL | impl<N> Foo for B<N> {}
| ^
|
help: consider changing this type parameter to a const parameter
|
LL - impl<N> Foo for B<N> {}
LL + impl<const N: u8> Foo for B<N> {}
|
```
Part of rust-lang/rust#141973.
|
|
Reduce `ast::ptr::P` to a typedef of `Box`
As per the MCP at https://github.com/rust-lang/compiler-team/issues/878.
r? `@fee1-dead`
|
|
unsafe keyword docs: emphasize that an unsafe fn in a trait does not get to choose its safety contract
Inspired by discussion in https://github.com/rust-lang/rust/issues/139368.
Cc `@hanna-kruppe`
|
|
Reexport types from `c_size_t` in `std`
These are unstably available in `core` and should be in `std` too, but are not currently reexported. Resolve this here.
Tracking issue: https://github.com/rust-lang/rust/issues/88345
|
|
r=saethlin
bootstrap: build std sans leaf frame pointers
Sometimes leaf frame-pointers can impact LLVM inlining choices, and that can be a real problem for things like `mul_add`.
|
|
|
|
choose its safety contract
|
|
```
error[E0277]: `()` is not a future
--> $DIR/unnecessary-await.rs:28:10
|
LL | e!().await;
| ^^^^^ `()` is not a future
|
= help: the trait `Future` is not implemented for `()`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
help: remove the `.await`
|
LL - e!().await;
LL + e!();
|
```
```
error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/const-fn-in-vec.rs:1:47
|
LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5];
| ^^^^ the trait `Copy` is not implemented for `String`
|
= note: required for `Option<String>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
help: create an inline `const` block
|
LL | static _MAYBE_STRINGS: [Option<String>; 5] = [const { None }; 5];
| +++++++ +
```
|
|
```
error[E0604]: only `u8` can be cast as `char`, not `u32`
--> $DIR/E0604.rs:2:5
|
LL | 1u32 as char;
| ^^^^^^^^^^^^ invalid cast
|
help: try `char::from_u32` instead
|
LL - 1u32 as char;
LL + char::from_u32(1u32);
|
```
```
error[E0620]: cast to unsized type: `&[u8]` as `[char]`
--> $DIR/cast-to-slice.rs:6:5
|
LL | arr as [char];
| ^^^^^^^^^^^^^
|
help: try casting to a reference instead
|
LL | arr as &[char];
| +
```
```
error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send`
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5
|
LL | Box::new(1) as dyn Send;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
help: you can cast to a `Box` instead
|
LL | Box::new(1) as Box<dyn Send>;
| ++++ +
```
|