| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Make useless_ptr_null_checks smarter about some std functions
This teaches the `useless_ptr_null_checks` lint that some std functions can't ever return null pointers, because they need to point to valid data, get references as input, etc.
This is achieved by introducing an `#[rustc_never_returns_null_ptr]` attribute and adding it to these std functions (gated behind bootstrap `cfg_attr`).
Later on, the attribute could maybe be used to tell LLVM that the returned pointer is never null. I don't expect much impact of that though, as the functions are pretty shallow and usually the input data is already never null.
Follow-up of PR #113657
Fixes #114442
|
|
Stabilize const_transmute_copy
Closes #83165
|
|
r=GuillaumeGomez
rustdoc: merge theme css into rustdoc.css
Based on https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119
Having them in separate files used to make more sense, before the migration to CSS variables made the theme files as small as they are nowadays. This is already how docs.rs and mdBook do it.
WebPageTest comparison page:
https://www.webpagetest.org/video/compare.php?tests=230913_AiDc3F_B9E,230913_AiDc7G_B9B
Filmstrip comparison:

Old waterfall:

New waterfall:

|
|
Update cargo
11 commits in 2fc85d15a542bfb610aff7682073412cf635352f..d5336f813df39d476e61fc46daabb1446350660a
2023-09-09 01:49:46 +0000 to 2023-09-14 19:55:49 +0000
- fix: emit a warning for `credential-alias` shadowing (rust-lang/cargo#12671)
- refactor: fix lint errors in preparation of `[lints]` table integration (rust-lang/cargo#12669)
- Limit cargo add feature print (rust-lang/cargo#12662)
- Clippy (rust-lang/cargo#12667)
- Prerelease candidates error message (rust-lang/cargo#12659)
- Fix typos: `informations` -> `information` (rust-lang/cargo#12666)
- chore: update globset to 0.4.13 (rust-lang/cargo#12665)
- refactor: Consolidate clap/shell styles (rust-lang/cargo#12655)
- libgit2 fixed upstream (rust-lang/cargo#12657)
- Index summary enum (rust-lang/cargo#12643)
- feat(help): Add styling to help output (rust-lang/cargo#12578)
r? ghost
|
|
|
|
|
|
Based on
https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119
Having them in separate files used to make more sense, before the
migration to CSS variables made the theme files as small as they are
nowadays. This is already how docs.rs and mdBook do it.
|
|
llvm-wrapper: adapt for LLVM API changes
No functional changes intended.
Adapts the wrapper for https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200.
Found by our experimental rust + llvm @ head CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22301#018a9926-a810-4e56-8ac2-e6f30b78f433/253-551
|
|
No functional changes intended.
Adapts the wrapper for https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200.
Found by our experimental rust + llvm @ head CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22301#018a9926-a810-4e56-8ac2-e6f30b78f433/253-551
|
|
r=compiler-errors
Migrate `rustc_hir_analysis` to session diagnostic [Part 6]
Part 6: Finish `coherence/inherent_impls.rs` file
|
|
Ignore `#[doc(hidden)]` functions in clippy doc lints
Fixes https://github.com/rust-lang/rust-clippy/issues/11501
The implementation before #115689 had a check for unsugared doc comments that also happened to catch `#[doc(hidden)]`, this adds the check back in more explicitly
https://github.com/rust-lang/rust/blob/852bf4e51bf260550cd1a280d2146f1c0641b1e8/src/tools/clippy/clippy_lints/src/doc.rs#L526-L529
r? `@flip1995`
|
|
Canonicalize effect vars in new solver
No good reason not to fix this, we already have all the machinery to make this work.
r? `@fee1-dead`
Fixes #115792
|
|
|
|
Make 'remove semi to coerce match' diagnostic translatable
|
|
|
|
Fallback effects even if types also fallback
`||` is short circuiting, so if we do ty/int var fallback, we *don't* do effect fallback 😸
r? `@fee1-dead` or `@oli-obk`
Fixes #115791
Fixes #115842
|
|
rusdoc: add gui test for custom CSS themes
Based on
https://github.com/rust-lang/rust/pull/115829#issuecomment-1720056602
|
|
|
|
Based on
https://github.com/rust-lang/rust/pull/115829#issuecomment-1720056602
|
|
Improve invalid let expression handling
- Move all of the checks for valid let expression positions to parsing.
- Add a field to ExprKind::Let in AST/HIR to mark whether it's in a valid location.
- Suppress some later errors and MIR construction for invalid let expressions.
- Fix a (drop) scope issue that was also responsible for #104172.
Fixes #104172
Fixes #104868
|
|
Part 6: Finish `coherence/inherent_impls.rs`
|
|
|
|
Rollup of 4 pull requests
Successful merges:
- #115772 (Improve Span in smir)
- #115832 (Fix the error message for `#![feature(no_coverage)]`)
- #115834 (Properly consider binder vars in `HasTypeFlagsVisitor`)
- #115844 (Paper over an accidental regression)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Paper over an accidental regression
r? types
cc https://github.com/rust-lang/rust/issues/115781 (do not close issue until beta backport has been performed)
The PR reasons are explained with comments in the source.
In order to keep the diff simple, this PR effectively reverts https://github.com/rust-lang/rust/pull/113661, but only for RPITs. I will submit a follow up PR that fixes this correctly instead of just disabling the newly added check for RPITs. This PR should be significantly easier to review for beta backport
|
|
Properly consider binder vars in `HasTypeFlagsVisitor`
Given a PolyTraitRef like `for<'a> Ty: Trait` (where neither `Ty` nor `Trait` mention `'a`), we do *not* return true for `.has_type_flags(TypeFlags::HAS_LATE_BOUND)`, even though binders are supposed to act as if they have late-bound vars even if they don't mention them in their bound value: 31ae3b2bdb9376b749fc1d64b531e86806e03c73. This is because we use `HasTypeFlagsVisitor`, which only computes the type flags for `Ty`, `Const` and `Region` and `Predicates`, and we consequently skip any binders (and setting flags for their vars) that are not contained in one of these types.
This ends up causing a problem, because when we call `TyCtxt::erase_regions` (which both erases regions *and* anonymizes bound vars), we will skip such a PolyTraitRef, not anonymizing it, and therefore not making it structurally equal to other binders. This breaks vtable computations.
This PR computes the flags for all binders we enter in `HasTypeFlagsVisitor` if we're looking for `TypeFlags::HAS_LATE_BOUND` (or `TypeFlags::HAS_{RE,TY,CT}_LATE_BOUND`).
Fixes #115807
|
|
Fix the error message for `#![feature(no_coverage)]`
When #114656 was written, the feature flag to replace `no_coverage` was originally spelled `coverage`, but it was eventually changed to `coverage_attribute` instead.
That update happened to miss this error message in `removed.rs`, and unfortunately I only noticed just *after* the original PR was approved and merged.
cc ``@bossmc`` (original author) ``@oli-obk`` (original reviewer)
``@rustbot`` label +A-code-coverage
|
|
Improve Span in smir
Addressing https://github.com/rust-lang/project-stable-mir/issues/31
r? ``@oli-obk``
|
|
consistently pass ty::Const through valtrees
Some drive-by things extracted from https://github.com/rust-lang/rust/pull/115748.
|
|
|
|
treat host effect params as erased in codegen
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
r? `@oli-obk`
|
|
Change `unsafe_op_in_unsafe_fn` to be `warn`-by-default from edition 2024
This was previously FCPed: https://github.com/rust-lang/rust/issues/71668#issuecomment-1189396886
There were two blocking requirements:
* Fix the `unused_unsafe` lint, done in https://github.com/rust-lang/rust/pull/100081
* Have `cargo fix` able to fix the lint, done in https://github.com/rust-lang/rust/pull/112017
|
|
some ConstValue refactoring
In particular, use AllocId instead of Allocation in ConstValue::ByRef. This helps avoid redundant AllocIds when a `ByRef` constant gets put back into the interpreter.
r? `@oli-obk`
Fixes https://github.com/rust-lang/rust/issues/105536
|
|
|
|
|
|
|
|
|
|
Remove `clubby789` from `users_on_vacation`
|
|
This fixes the changes brought to codegen tests when effect params are
added to libcore, by not attempting to monomorphize functions that get
the host param by being `const fn`.
|
|
Visit ExprField for lint levels.
Fixes https://github.com/rust-lang/rust/issues/115823
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
some inspect improvements
split from #114810 because I still want to experiment a bunch with that PR and these changes are self-contained.
r? `@compiler-errors`
|
|
|
|
|