| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Fix the tracking issue for hash_raw_entry
It used to point to the implementation PR.
|
|
std::str Adapt documentation to reality
|
|
Pass additional linker flags when targeting Fuchsia
This is a follow up to 8aa9267 which changed the driver to use lld
directly rather than invoking it through Clang. This change ensures
we pass all the necessary flags to lld.
|
|
Add unstable Literal::subspan().
Take 2 of #55971. Still ~wrong, but now with a comment! (and less of a surface) Unblocks #49219.
r? @alexcrichton
|
|
ci: Download clang/lldb from tarballs
Hopefully will speed up CI slightly!
|
|
Fix invalid bitcast taking bool out of a union represented as a scalar
As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
|
|
Fix json output in the self-profiler
Fix missing ',' array element separators and convert NaN's to 0.
cc @Mark-Simulacrum
|
|
Add rustc_codegen_ssa to sysroot
Outside of rustc you are currently unable to use it.
r? @nikomatsakis (because you r+'ed #55627)
|
|
When popping in CTFE, perform validation before jumping to next statement to have a better span for the error
Currently, when validating the return value fails, the span points at the next statement after the call. That does not make much sense.
r? @oli-obk
|
|
Ensure that the argument to `static_assert` is a `bool`
cc @eddyb
|
|
Add std::iter::unfold
This adds an **unstable** ~`std::iter::iterate`~ `std::iter::unfold` function and ~`std::iter::Iterate`~ `std::iter::Unfold` type that trivially wrap a ~`FnMut() -> Option<T>`~ `FnMut(&mut State) -> Option<T>` closure to create an iterator. ~Iterator state can be kept in the closure’s environment or captures.~
This is intended to help reduce amount of boilerplate needed when defining an iterator that is only created in one place. Compare the existing example of the `std::iter` module: (explanatory comments elided)
```rust
struct Counter {
count: usize,
}
impl Counter {
fn new() -> Counter {
Counter { count: 0 }
}
}
impl Iterator for Counter {
type Item = usize;
fn next(&mut self) -> Option<usize> {
self.count += 1;
if self.count < 6 {
Some(self.count)
} else {
None
}
}
}
```
… with the same algorithm rewritten to use this new API:
```rust
fn counter() -> impl Iterator<Item=usize> {
std::iter::unfold(0, |count| {
*count += 1;
if *count < 6 {
Some(*count)
} else {
None
}
})
}
```
-----
This also add unstable `std::iter::successors` which takes an (optional) initial item and a closure that takes an item and computes the next one (its successor).
```rust
let powers_of_10 = successors(Some(1_u16), |n| n.checked_mul(10));
assert_eq!(powers_of_10.collect::<Vec<_>>(), &[1, 10, 100, 1_000, 10_000]);
```
|
|
Fix #[cfg] for step impl on ranges
```#[cfg(target_pointer_witdth = ...)]``` is misspelled
|
|
Disable some pretty-printers when gdb is rust-enabled
A rust-enabled gdb already knows how to display string slices,
structs, tuples, and enums (and after #54004, the pretty-printers
can't handle enums at all). This patch disables these pretty-printers
when gdb is rust-enabled.
The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed,
because it does not seem to depend on any behavior of that version of
gdb, and because gdb 7.7 is 4 years old now.
|
|
submodules: update clippy from 2f6881c6 to 754b4c07
Changes:
````
rustup https://github.com/rust-lang/rust/pull/54071/
dependencies: update pulldown-cmark from 0.1 to 0.2
s/file_map/source_map
````
r? @oli-obk
|
|
Changes:
````
rustup https://github.com/rust-lang/rust/pull/54071/
dependencies: update pulldown-cmark from 0.1 to 0.2
s/file_map/source_map
````
|
|
Suggest correct syntax when writing type arg instead of assoc type
- When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
- When encountering multiple missing associated types, emit only one diagnostic.
- Point at associated type def span for context.
- Point at each extra type argument.
Follow up to #48288, fix #20977.
|
|
rustc_target: separate out an individual alignment quantity type from Align.
Before this PR, `rustc_target::abi::Align` combined "power-of-two alignment quantity" semantics, with a distinction between ABI (required) and preferred alignment (by having two quantities).
After this PR, `Align` is only *one* such quantity, and a new `AbiAndPrefAlign` type is introduced to hold the pair of ABI and preferred `Align` quantities.
`Align` is used everywhere one quantity is necessary/sufficient, simplifying some of the code in codegen/miri, while `AbiAndPrefAlign` only in layout computation (to propagate preferred alignment).
r? @oli-obk cc @nagisa @RalfJung @nikomatsakis
|
|
This is a somewhat arbitrary restriction in order to be consistent in the
output of the tests regardless of target platform.
|
|
|
|
When confusing an associated type with a type argument, suggest the
appropriate syntax.
Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
|
|
|
|
|
|
|
|
r=petrochenkov
Issue 56128 segment id ice nightly
Tentative fix for #56128
From what I can tell, the problem is that if you have `pub(super) use foo::{a, b}`, then when we explode the `a` and `b`, the segment ids from the `super` path were not getting cloned. However, once I fixed *that*, then I ran into a problem that the "visibility" node-ids were not present in the final HIR -- this is because the visibility of the "stem" that is returned in this case was getting reset to inherited. I don't *think* it is a problem to undo that, so that the visibility is returned unmodified.
Fixes #55475
Fixes #56128
cc @nrc @petrochenkov
|
|
|
|
|
|
It used to point to the implementation PR.
|
|
Move Cargo.{toml,lock} to the repository root directory.
This should give us back `src/` in errors, panics and debuginfo, for free.
r? @Mark-Simulacrum @alexcrichton cc @michaelwoerister
|
|
|
|
|
|
|
|
submodules: update clippy from f5d868c9 to 2f6881c6
Changes:
````
missed another one in the README
run "util/dev update_lints"
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
Address 'clippy::single-match' dogfood lint
Fix nit
Address travis CI lint failure
Update trivially_copy_pass_by_ref with Trait stderr output
issue#3318 run trivially_copy_pass_by_ref for traits
Update trivially_copy_pass_by_ref with Trait examples
Fix awkward wording
Document how to lint local Clippy changes with locally built Clippy
Enable rustup clippy to refer to the correct documentation
rustup https://github.com/rust-lang/rust/pull/52591
remove unused allow() attributes, NFC
Add regression test
Don't emit suggestion when inside of a macro
````
fixes clippy toolstate
|
|
````
missed another one in the README
run "util/dev update_lints"
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
Address 'clippy::single-match' dogfood lint
Fix nit
Address travis CI lint failure
Update trivially_copy_pass_by_ref with Trait stderr output
issue#3318 run trivially_copy_pass_by_ref for traits
Update trivially_copy_pass_by_ref with Trait examples
Fix awkward wording
Document how to lint local Clippy changes with locally built Clippy
Enable rustup clippy to refer to the correct documentation
rustup https://github.com/rust-lang/rust/pull/52591
remove unused allow() attributes, NFC
Add regression test
Don't emit suggestion when inside of a macro
````
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- #55367 (lint if a private item has doctests)
- #55485 (Return &T / &mut T in ManuallyDrop Deref(Mut) impl)
- #55784 (Clarifying documentation for collections::hash_map::Entry::or_insert)
- #55961 (Fix VecDeque pretty-printer)
- #55980 (Suggest on closure args count mismatching with pipe span)
- #56002 (fix #55972: Erroneous self arguments on bare functions emit subpar compilation error)
- #56063 (Update any.rs documentation using keyword dyn)
- #56067 (Add SGX target to rustc)
- #56078 (Fix error message for `-C panic=xxx`.)
- #56106 (Remove some incorrect doc comments)
- #56126 (core/benches/num: Add `from_str/from_str_radix()` benchmarks)
Failed merges:
r? @ghost
|
|
core/benches/num: Add `from_str/from_str_radix()` benchmarks
This was extracted from #55973
/cc @alexcrichton
|
|
Remove some incorrect doc comments
|
|
Fix error message for `-C panic=xxx`.
Fixes rust-lang/cargo#6334
|
|
Add SGX target to rustc
This adds the `x86_64-fortanix-unknown-sgx` target specification to the Rust compiler. See #56066 for more details about this target.
|
|
Update any.rs documentation using keyword dyn
This will fix #56062.
|
|
fix #55972: Erroneous self arguments on bare functions emit subpar compilation error
#55972
r? @estebank
|
|
Suggest on closure args count mismatching with pipe span
Closes #55891
r? @estebank
|
|
Fix VecDeque pretty-printer
This fixes the VecDeque pretty-printer to handle cases where
head < tail.
Closes #55944
|
|
Clarifying documentation for collections::hash_map::Entry::or_insert
Previous version does not show that or_insert does not insert the passed value, as the passed value was the same value as what was already in the map.
|
|
Return &T / &mut T in ManuallyDrop Deref(Mut) impl
Without this change the generated documentation looks like this:
fn deref(&self) -> &<ManuallyDrop<T> as Deref>::Target
Returning the actual type directly makes the generated docs more clear:
fn deref(&self) -> &T
Basically, compare how the impl for `Box<T>` and `ManuallyDrop<T>` looks in this screenshot:

|
|
r=QuietMisdreavus
lint if a private item has doctests
Fixes #55333.
r? @QuietMisdreavus
|
|
This is a follow up to 8aa9267 which changed the driver to use lld
directly rather than invoking it through Clang. This change ensures
we pass all the necessary flags to lld.
|