| Age | Commit message (Collapse) | Author | Lines |
|
Rollup of 11 pull requests
Successful merges:
- #62984 (Add lint for excess trailing semicolons)
- #63075 (Miri: Check that a ptr is aligned and inbounds already when evaluating `*`)
- #63490 (libsyntax: cleanup and refactor `pat.rs`)
- #63507 (When needing type annotations in local bindings, account for impl Trait and closures)
- #63509 (Point at the right enclosing scope when using `await` in non-async fn)
- #63528 (syntax: Remove `DummyResult::expr_only`)
- #63537 (expand: Unimplement `MutVisitor` on `MacroExpander`)
- #63542 (Add NodeId for Arm, Field and FieldPat)
- #63543 (Merge Variant and Variant_)
- #63560 (move test that shouldn't be in test/run-pass/)
- #63570 (Adjust tracking issues for `MaybeUninit<T>` gates)
Failed merges:
r? @ghost
|
|
Bump to 1.39
r? @Centril
|
|
|
|
|
|
Provide map_ok and map_err method for Poll<Option<Result<T, E>>>
Currently `map_ok` and `map_err` methods are given for `Poll<Result<T, E>>`.
This PR adds these methods for `Poll<Option<Result<T, E>>>` as they are helpful in stream building code.
|
|
sd234678:remove-unneeded-comment-from-src/libcore/hash, r=Centril
Remove unneeded comment in src/libcore/hash/mod.rs
Split out from larger PR #63347 - other sections in there require further discussion.
r? @Centril
|
|
Implement Clone, Display for ascii::EscapeDefault
This will mimic the same behaviour as the `char` version; `Display`ing the iterator will give its string representation without advancing it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By default, closures inherit the generic parameters of their scope,
including `Self`. However, in most cases, the closures used to implement
iterators don't need to be generic on the iterator type, only its `Item`
type. We can reduce this genericity by redirecting such closures through
local functions.
This does make the closures more cumbersome to write, but it will
hopefully reduce duplication in their monomorphizations, as well as
their related type lengths.
|
|
Improve pointer offset method docs
Cc @rkruppe @gnzlbg
|
|
Add an example to show how to insert item to a sorted vec
Closes #61684
cc #61742
r? @Mark-Simulacrum, @jonas-schievink
|
|
Lint on some incorrect uses of mem::zeroed / mem::uninitialized
Cc https://github.com/rust-lang/rust/issues/62825 and https://internals.rust-lang.org/t/make-mem-uninitialized-and-mem-zeroed-panic-for-some-types-where-0-is-a-niche/10605
This does not yet handle `NonNull`/`NonZero*`, but it is a start.
I also improved some doc issues I hit on the way, and added a useful helper to `TyS`.
EDIT: I added the relnotes label mostly as a proposal -- I think this is worth mentioning, but leave the decision up to the release team.
|
|
|
|
Back out #62150
Ref: #62825
cc @RalfJung
|
|
|
|
|
|
This reverts commit 1d45156866b54c3fc36edfdfcdd8149ad9cb5711, reversing
changes made to 0f92eb8a4a7d8715381f5b5d748d22315f6ff9c7.
|
|
Use associated_type_bounds where applicable - closes #61738
|
|
Give built-in macros stable addresses in the standard library
Continuation of https://github.com/rust-lang/rust/pull/62086.
Derive macros corresponding to traits from libcore are now available through the same paths as those traits:
- `Clone` - `{core,std}::clone::Clone`
- `PartialEq` - `{core,std}::cmp::PartialEq`
- `Eq` - `{core,std}::cmp::Eq`
- `PartialOrd` - `{core,std}::cmp::PartialOrd`
- `Ord` - `{core,std}::cmp::Ord`
- `Default` - `{core,std}::default::Default`
- `Debug` - `{core,std}::fmt::Debug`
- `Hash` - `{core,std}::hash::Hash`
- `Copy` - `{core,std}::marker::Copy`
Fn-like built-in macros are now available through libcore and libstd's root module, by analogy with non-builtin macros defined by libcore and libstd:
```rust
{core,std}::{
__rust_unstable_column,
asm,
assert,
cfg,
column,
compile_error,
concat,
concat_idents,
env,
file,
format_args,
format_args_nl,
global_asm,
include,
include_bytes,
include_str,
line,
log_syntax,
module_path,
option_env,
stringify,
trace_macros,
}
```
Derive macros without a corresponding trait in libcore or libstd are still available only through prelude (also see https://github.com/rust-lang/rust/pull/62507).
Attribute macros also keep being available only through prelude, mostly because they don't have an existing practice to follow. An advice from the library team on their eventual placement would be appreciated.
```rust
RustcDecodable,
RustcEncodable,
bench,
global_allocator,
test,
test_case,
```
r? @alexcrichton
|
|
|
|
Stabilize duration_float
Closes: #54361
|
|
|
|
|
|
reduce some test sizes in Miri
|
|
enable flt2dec tests in Miri
With ldexp implemented (thanks to @christianpoveda), we can finally enable these tests in Miri. Well, most of them -- some are just too slow.
|
|
Improve test output
I'm continuing to improve the test output for liballoc and libcore
|
|
Remove gensym in format_args
This also fixes some things to allow us to export opaque macros from libcore:
* Don't consider items that are only reachable through opaque macros as public/exported (so they aren't linted as needing docs)
* Mark private items reachable from the root of libcore as unstable - they are now reachable (in principle) in other crates via macros in libcore
r? @petrochenkov
|
|
Deprecate `try!` macro
Replaces #62077
Fixes rust-lang/rust-clippy#1361
Fixes #61000
|
|
|
|
|
|
|