Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ampmut mut suggestions dbgs #1

Open
wants to merge 1,478 commits into
base: master
Choose a base branch
from

Conversation

saleemjaffer
Copy link
Owner

No description provided.

LinusU and others added 30 commits March 16, 2019 11:13
…chton

Fix SGX implementations of read/write_vectored.
Fix generic argument lookup for Self

Rewrite the SelfCtor early and use the replacement Def when
calculating the path_segs.

Note that this also changes which def is seen by the code that
computes user_self_ty and is_alias_variant_ctor; I don't see a
immediate issue with that, but I'm not 100% clear on the
implications.

Fixes rust-lang#57924

r? @eddyb
Fix ICE in MIR pretty printing

A `Def::Variant` should be considered as a function in mir pretty
printing. Each variant has a constructor that we must print.

Given the following enum definition:

```rust
pub enum TestMe {
    X(usize),
}
```

We will need to generate a constructor for the variant `X` with a
signature that looks something like the following:

```
fn TestMe::X(_1: usize) -> TestMe;
```

Fixes: rust-lang#59021
…tMisdreavus

Avoid some common false positives in intra doc link checking

The empty string case is never going to be a link. The numeric case may be a link, but if it were it would have resolved locally. It's more likely the makeshift markdown footnote notation (`[0]`, etc)

r? @QuietMisdreavus
we can now skip should_panic tests with the libtest harness
add suggestions to invalid macro item error

r? @estebank
…Centril

A few improvements to comments in user-facing crates

Not too many this time, and all concern comments (almost all doc comments) in user-facing crates (libstd, libcore, liballoc).

r? @steveklabnik
…chton

Consistent naming for duration_float methods and additional f32 methods

`duration_float` tracking issue: rust-lang#54361

New list of methods:
- `as_secs_f64(&self) -> f64`
- `as_secs_f32(&self) -> f32`
- `from_secs_f64(secs: f64) -> Duration`
- `from_secs_f32(secs: f32) -> Duration`
- `mul_f64(self, rhs: f64) -> Duration`
- `mul_f32(self, rhs: f32) -> Duration`
- `div_f64(self, rhs: f64) -> Duration`
- `div_f32(self, rhs: f64) -> Duration`
- `div_duration_f64(self, rhs: Duration) -> f64`
- `div_duration_f32(self, rhs: Duration) -> f32`

With [`num_traits::Float`](https://docs.rs/num-traits/0.2.6/num_traits/float/trait.Float.html) we could've reduced number of methods by factor of two, but unfortunately it's not part of `std`.
…=alexreg

rustc: fix ICE when trait alias has bare Self

Fixes rust-lang#59029
…RalfJung

Unregress using scalar unions in constants.

fixes rust-lang#59126

r? @RalfJung

I also made a bunch of these invariants panic instead of report an error.
Suggest return lifetime when there's only one named lifetime

Fix rust-lang#29094.
Make std time tests more robust for platform differences

Previously, `time::tests::since_epoch` and `time::tests::system_time_math` would fail if the platform represents a SystemTime as unix epoch + `u64` nanoseconds.

r? @sfackler
Stabilize Range*::contains.

Closes rust-lang#32311. There's also a bit of rustfmt on range.rs thrown in for good measure (I forgot to turn off format-on-save in VSCode).
[wg-async-await] Add regression test for rust-lang#55809.

Fixes rust-lang#55809.

This PR adds a regression test for rust-lang#55809 which checks that a
overflow does not occur when evaluating a requirement for async
functions and `&mut` arguments in some specific circumstances.
…llaumeGomez

Revert "Don't generate minification variable if minification disabled"

Reverts rust-lang#58643

Fixes rust-lang#59157

rust-lang#58643 made us stop generating minification variables when minification is disabled, however they may still be needed for parent crates that were generated with minification (this will always be the case for libstd and libcore)

r? @QuietMisdreavus @GuillaumeGomez
…ertj

Add `-Z allow_features=...` flag

Adds a compiler option to allow only whitelisted features.

For projects on nightly that want to prevent feature-creep (and maybe, someday, move off of nightly). Not being able to enforce this has been a problem on Fuchsia and at other big companies.

This doesn't support filtering edition feature flags, but someone is welcome to add that if they need it.
bootstrap: Default to a sensible llvm-suffix.

I used version-channel-sha, hopefully that should work.

I checked that bootstrap builds, but I cannot check anything else since the llvm
build process is started from cargo, and thus calls clang, and thus I hit the
same bug I hope to fix with this change.

Hopefully fixes rust-lang#59034.
Don't run test launching `echo` since that doesn't exist on Windows
No old chestnuts in iter::repeat docs

The current language may be amusing, yet is just imprecise and most especially difficult to understand for someone who speaks English as a foreign language.
…-restriction, r=alexcrichton

Remove restriction on isize/usize in repr(simd)

As discussed in rust-lang#55078, there's no known reason for this restriction.

It's unlikely that repr(simd) will be stabilized in its current form, but
might as well remove some restrictions on it.

This removes the branch in `is_machine` which returns false for these types.
`is_machine` is only used for the repr(simd) type validation check.
Output diagnostic information for rustdoc

Use the information same as rustc.
petrochenkov and others added 28 commits March 24, 2019 12:10
…chenkov

Use a valid name for graphviz graphs

Hiridification has broken graphviz output because `HirId` has a more complex display implemetation than `NodeId`. Since the id was just used to generate a distinct identifier, we just pull out the various constituent indexed.
Do not encode gensymed imports in metadata

(Unless they are underscore `_` imports which are re-gensymed on crate loading, see rust-lang#56392.)

We cannot encode gensymed imports properly in metadata and if we encode them improperly, we can get erroneous name conflicts downstream.
Gensymed imports are produced by the compiler, so we control their set, and can be sure that none of them needs being encoded for use from other crates.

A workaround that fixes rust-lang#59243.
Implement specialized nth_back() for Box and Windows.

Hi there, this is my first pull request to rust :-)

I started implementing some specializations for DoubleEndedIterator::nth_back() and these are the first two. The problem has been discussed in rust-lang#54054 and nth_back() is tracked in rust-lang#56995.

I'm stuck with the next implementation so I though I do a PR for the ones I'm confident with to get some feedback.
…trochenkov

Fix ICE with const generic param in struct

Fixes rust-lang#59340.

r? @petrochenkov
(WIP) Small fixes in chalkification

Small fixes around region constraints and builtin impls. There are still some type inference errors, for example the following code errors out:
```rust
fn main() {
    let mut x: Vec<i32> = Vec::new();
    //                    ^^^^^^^^ cannot infer type for `std::vec::Vec<_>`
}
```
but explicitly specifying `Vec::<i32>::new` works.

With these few fixes, the following code now passes type-checking:
```rust
fn main() {
    let mut x: Vec<i32> = Vec::<i32>::new();
    x.push(5);
    println!("{:?}", x);
}
```

I also fixed the implied bounds bug as discussed on Zulip and in rust-lang/chalk#206

cc @tmandry
r? @nikomatsakis
Correct minimum system LLVM version in tests

Since commit 9452a8d, the new debug info format is only generated
for LLVM 8 and newer versions. However, the tests still assume that LLVM
7 will use the new debug info format. Fix the tests (and a comment in
the code) to match the actual version check.
`DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so
the instruction shouldn't be blindly unwrapped.
This commit removes `CtorOf` from `Node::Ctor` as the parent of the
constructor can be determined by looking at the node's parent in the few
places where knowing this is necessary.
Rollup of 7 pull requests

Successful merges:

 - rust-lang#59213 (Track changes to robots.txt)
 - rust-lang#59239 (Remove inline assembly from hint::spin_loop)
 - rust-lang#59251 (Use a valid name for graphviz graphs)
 - rust-lang#59296 (Do not encode gensymed imports in metadata)
 - rust-lang#59328 (Implement specialized nth_back() for Box and Windows.)
 - rust-lang#59355 (Fix ICE with const generic param in struct)
 - rust-lang#59377 (Correct minimum system LLVM version in tests)
This commit moves the definition of `CtorOf` from `rustc::hir` to
`rustc::hir::def` and adds imports wherever it is used.
This commit moves the `DefId` field of `Def::Ctor` to be the first
field.
When encountering code like the following, suggest borrowing the for loop
head to avoid moving it into the for loop pattern:

```
fn main() {
    let a = vec![1, 2, 3];
    for i in &a {
        for j in a {
            println!("{} * {} = {}", i, j, i * j);
        }
    }
}
```
…rochenkov

Separate `DefId`s for variants and their constructors

Part of rust-lang#44109. Split off from rust-lang#59376. See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140) for previous discussion.

r? @petrochenkov
When moving out of a for loop head, suggest borrowing it

When encountering code like the following, suggest borrowing the for loop
head to avoid moving it into the for loop pattern:

```
fn main() {
    let a = vec![1, 2, 3];
    for i in &a {
        for j in a {
            println!("{} * {} = {}", i, j, i * j);
        }
    }
}
```

Fix rust-lang#25534.
use the identifier span for missing struct field
make asm diagnostic instruction optional

`DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so
the instruction shouldn't be blindly unwrapped.

Reopening from rust-lang#55193. I was unable to trigger the assertion on Windows after rebasing.

Fixes rust-lang#23458.
Fixes rust-lang#55216.
Make meta-item API compatible with `LocalInternedString::get` soundness fix

r? @Zoxc
…i-obk

filter suggestions from extern prelude

Fixes rust-lang#59027.

Modifies the candidate gathering code to call `filter_fn` on extern crates, which causes them to be filtered out when looking for a type.
SGX target: fix std unit tests

This fixes some tests and some code in the SGX sys implementation to make the `std` unit test suite pass.

rust-lang#59009 must be merged first.
saleemjaffer pushed a commit that referenced this pull request May 4, 2019
saleemjaffer pushed a commit that referenced this pull request Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.