| Age | Commit message (Collapse) | Author | Lines |
|
Require const stability attributes on intrinsics to be able to use them in constant contexts
r? @Centril
finally fixes #61495
cc @RalfJung
|
|
|
|
|
|
|
|
Document why Any is not an unsafe trait
The added documentation is not public (i.e., not in a doc comment) but that seems appropriate for this sort of low-level detail.
Fixes #62303
|
|
Remove iter_private.rs
The contents of this file have been moved in #56932 (520e8b0) and the file should have been removed as well.
|
|
|
|
|
|
|
|
|
|
Implementation of
https://github.com/rust-lang/rfcs/pull/2799
|
|
Require issue = "none" over issue = "0" in unstable attributes
These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler.
Notes:
- #66299 is now in beta so `issue = "none"` is accepted.
- The `tidy` tool now fails on `issue = "0"`.
- Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used.
- The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated.
Resolves #41260
r? @varkor
|
|
Document privacy of RangeInclusive fields
Fixes #67371
|
|
use _val to ignore parameter of any::type_name_of_val
mem::drop does the same thing too.
|
|
|
|
|
|
Fix src/libcore/str/mod.rs doc comments
Fix grammar in src/libcore/str/mod.rs doc comments. r? @steveklabnik
|
|
Make ptr::slice_from_raw_parts a const fn available under a feature flag
A first step in the direction of https://github.com/rust-lang/rust/issues/67456 .
This makes `ptr::slice_from_raw_parts` and `ptr::slice_from_raw_parts_mut` available as a const fn under a feature flag.
|
|
|
|
|
|
The contents of this file have been moved in #56932 (520e8b0) and the
file should have been removed as well.
|
|
|
|
constant contexts
|
|
Split up ptr/mod.rs in libcore...
...one with implementation detail for const ptr and the other with mut ptr
I am not sure if the "stable since 1.0.0" flags are the correct choice for the two additional mods.
Also, is it necessary for them to be "pub"? If so, there should be a good description for them.
Closes #66891
|
|
|
|
Correct the todo! stabilization version
None
|
|
Add more delegations to the fmt docs and add doctests
HI,
this is a continuation to #67021
I replaced the `Debug` example with one that use the `Debug*` helpers so that padding etc will work too.
I also added asserts for the doctests as @RalfJung asked :)
The only thing I left with the `write!` macro is the `Display` example as I didn't know if there's a better way to do that.
r? @QuietMisdreavus
|
|
|
|
|
|
and the other with mut ptr
|
|
|
|
Minor: update Unsize docs for dyn syntax
|
|
use Self alias in place of macros
|
|
Improve code generated for `starts_with(<literal char>)`
This PR includes two minor improvements to the code generated when checking for string prefix/suffix.
The first commit simplifies the str/str operation, by taking advantage of the raw UTF-8 representation.
The second commit replaces the current str/char matching logic with a char->str encoding and then the previous method.
The resulting code should be equivalent in the generic case (one char is being encoded versus one char being decoded), but it becomes easy to optimize in the case of a literal char, which in most cases a developer might expect to be at least as simple as that of a literal string.
This PR should fix #41993
|
|
|
|
|
|
fix type_name_of_val doc comment
.
|
|
Stabilize the `core::panic` module
`std::panic` is already stable.
`core::panic::PanicInfo` and `core::panic::Location` are stable and can be used through that path because of a bug in stability checking: #15702
|
|
Add str::strip_prefix and str::strip_suffix
Introduces a counterpart for `Path::strip_prefix` on `str`.
This was also discussed in https://internals.rust-lang.org/t/pre-pr-path-strip-prefix-counterpart-in-str/11364/.
|
|
stabilize Result::map_or
r? @SimonSapin
Closes #66293
|
|
|
|
|
|
|
|
|
|
Doc typo
|
|
|
|
r=centril
Revert stabilization of never type
Fixes https://github.com/rust-lang/rust/issues/66757
I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean.
( cc @Centril, author of #65355, you may want to check this over briefly )
|
|
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
|
|
This reverts commit 089229a1935fa9795cfdefa518c8f8c3beb66db8.
|
|
Require stable/unstable annotations for the constness of all stable fns with a const modifier
r? @RalfJung @Centril
Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.
|