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

Rustup #2573

Merged
merged 16 commits into from
Sep 30, 2022
Merged

Rustup #2573

merged 16 commits into from
Sep 30, 2022

Conversation

RalfJung
Copy link
Member

@oli-obk trying your instructions for the first time. This seems to work fine (docker actually makes it quite convenient :D ), but it does create a copy of each merge commit, which over time will take a lot of room in our history I think.

Urgau and others added 14 commits September 27, 2022 17:38
Stabilize bench_black_box

This PR stabilize `feature(bench_black_box)`.

```rust
pub fn black_box<T>(dummy: T) -> T;
```

The FCP was completed in rust-lang/rust#64102.

`@rustbot` label +T-libs-api -T-libs
Suggest unwrapping `???<T>` if a method cannot be found on it but is present on `T`.

This suggests various ways to get inside wrapper types if the method cannot be found on the wrapper type, but is present on the wrappee.

For this PR, those wrapper types include `Localkey`, `MaybeUninit`, `RefCell`, `RwLock` and `Mutex`.
…y-binding, r=cjgillot

Deny associated type bindings within associated type bindings

Fixes #102335

This was made worse by #100865, which unified the way we generate substs for GATs and non-generic associated types. However, the issue was not _caused_ by #100865, evidenced by the test I added for GATs:

```rust
trait T {
    type A: S<C<(), i32 = ()> = ()>;
    //~^ ERROR associated type bindings are not allowed here
}

trait Q {}

trait S {
    type C<T>: Q;
}

fn main() {}
```

^ which passes on beta (where GATs are stable) and presumably ever since GATs support was added to `create_substs_for_associated_item` in astconv.
Unescaping cleanups

Some minor improvements.

r? `@matklad`
Tweak `FulfillProcessor`.

Avoids some unnecessary references and lifetimes.

r? `@jackh726`
Use already resolved `self_ty` in `confirm_fn_pointer_candidate`

Fixes #102289
… r=camelid

rustdoc: remove redundant mobile `.source > .sidebar` CSS

When the source sidebar and standard sidebar had most of their code merged in 07e3f998b1ceb4b8d2a7992782e60f5e776aa114, the properties `z-index: 11`, `margin: 0`, and `position: fixed` were already being set on the `.sidebar` class, so no need to repeat them.

https://github.com/rust-lang/rust/blob/57ee5cf5a93923dae9c98bffb11545fc3a31368d/src/librustdoc/html/static/css/rustdoc.css#L1742-L1754
Rollup of 8 pull requests

Successful merges:

 - #100747 (Add long description and test for E0311)
 - #102232 (Stabilize bench_black_box)
 - #102288 (Suggest unwrapping `???<T>` if a method cannot be found on it but is present on `T`.)
 - #102338 (Deny associated type bindings within associated type bindings)
 - #102347 (Unescaping cleanups)
 - #102348 (Tweak `FulfillProcessor`.)
 - #102378 (Use already resolved `self_ty` in `confirm_fn_pointer_candidate`)
 - #102380 (rustdoc: remove redundant mobile `.source > .sidebar` CSS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
More lexer improvements

A follow-up to #99884.

r? `@matklad`
…vidtwco

Migrate more of rustc_parse to SessionDiagnostic

Still far from complete, but I thought I'd add a checkpoint here because rebasing was starting to get annoying.
Do not overwrite lifetime binders for another HirId.

This PR makes higher-ranked bounds in where clauses a bit more principled.
We used to conflate `for<'a> T: Trait` with `(for<'a> T): Trait`.
This PR separates both binders.

This caused issued with fn types, which have their own binder, causing us to overwrite the predicates's binders with `fn`'s binders, ICEing.

Fixes rust-lang/rust#98594
…wesleywiser

Add `#[rustc_safe_intrinsic]`

This PR adds the `#[rustc_safe_intrinsic]` attribute as mentionned on Zulip. The goal of this attribute is to avoid keeping a list of symbols as the source for stable intrinsics, and instead rely on an attribute. This is similar to `#[rustc_const_stable]` and `#[rustc_const_unstable]`, which among other things, are used to mark the constness of intrinsic functions.
rustdoc: Remove `clean::TraitWithExtraInfo` and queryify `is_notable_trait`

cc `@notriddle` `@GuillaumeGomez`
@RalfJung
Copy link
Member Author

Hm, actually the history of this branch is strange. It seems entirely disconnected from master?

@RalfJung
Copy link
Member Author

RalfJung commented Sep 29, 2022

Also, there's a merge conflict, even though my master was up-to-date when I started this.

Looks like I need to to a merge by hand locally, then update rust-version, and then make the PR?
EDIT: yes that seems to work.

@oli-obk
Copy link
Contributor

oli-obk commented Sep 29, 2022

I don't think we can avoid the merge commits with josh. I wonder if things break if we just rebase this PR and let josh figure it out during the other direction (though I have screwed up things enough for that to get even more confusing. We're hitting a josh bug now due to our multiple "unrelated" histories).

@RalfJung
Copy link
Member Author

I rebased and updated this PR accordingly. The history indeed looks much better now.

But that old history is something where josh could do better I think, so it might make sense to bring this up with the josh devs? josh-project/josh#952

@RalfJung
Copy link
Member Author

Can we try what future syncs will look like before merging this, somehow?

@oli-obk
Copy link
Contributor

oli-obk commented Sep 29, 2022

Can we try what future syncs will look like before merging this, somehow?

wait for a rustc PR to get merged and sync again?

Or just sync again right now 😆

@RalfJung
Copy link
Member Author

Hm, I guess what that will do is that josh/master constructs parallel history and then git has increasing amounts of work to do in the rebase to deduplicate all that stuff...

@RalfJung
Copy link
Member Author

Yeah that does not look good

$ git merge josh/master
Auto-merging tests/fail/invalid_bool.rs
CONFLICT (content): Merge conflict in tests/fail/invalid_bool.rs
Automatic merge failed; fix conflicts and then commit the result.

@oli-obk
Copy link
Contributor

oli-obk commented Sep 29, 2022

does it work cleanly with a rebase instead of a merge? Like we need to rebase on every sync, not just this one

@RalfJung
Copy link
Member Author

For this sync I did

git merge josh/master
git rebase origin/master

The first step already fails now the simulating the next sync.

josh/master has completely separate history, I don't even know how to do a rebase without first merging...

@RalfJung
Copy link
Member Author

RalfJung commented Sep 29, 2022

I tried

# josh-ralf looks at my rustc fork which has the next Miri sync in it
git checkout josh-ralf/master # brings me into 'detached HEAD' state (but that is fine)
git rebase rustup

That leads to conflicts as well

warning: skipped previously applied commit 66b6b9c0
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
Auto-merging cargo-miri/Cargo.toml
CONFLICT (content): Merge conflict in cargo-miri/Cargo.toml
Auto-merging rust-version
CONFLICT (content): Merge conflict in rust-version
Auto-merging tests/fail/invalid_bool.rs
CONFLICT (content): Merge conflict in tests/fail/invalid_bool.rs
error: could not apply 8b9738b1... sync Miri
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 8b9738b1... sync Miri

@RalfJung
Copy link
Member Author

RalfJung commented Sep 29, 2022

So I moved this PR back to just git merge josh/master. But unfortunately, then doing git merge josh-ralf/master also leads to conflicts... but maybe that is an imperfect simulation of what would happen on a normal sync?

@RalfJung
Copy link
Member Author

RalfJung commented Sep 29, 2022

We could consider adding the :linear filter to our josh remote, that makes for a much smaller history -- basically one commit per rustc PR that changed Miri. Slightly sub-optimal for rustc PRs that do heavy Miri work though, but that is rare, and it keeps the history here much less noisy.

Of course that will duplicate some stuff since we already merged the other josh branch. We should probably first figure out what we want and then merge more things. ;)

EDIT: Also I doubt sync round-trips are going to work well with :linear.

@RalfJung
Copy link
Member Author

Given that this matches #2568, I'm going to land this now so that our CI cron job stays green. We already have josh history in this repo so if we want to change that we need a force-push anyway.

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 30, 2022

📌 Commit 5dc209f has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 30, 2022

⌛ Testing commit 5dc209f with merge 8e7293c...

@bors
Copy link
Collaborator

bors commented Sep 30, 2022

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 8e7293c to master...

@bors bors merged commit 8e7293c into rust-lang:master Sep 30, 2022
@RalfJung RalfJung deleted the rustup branch September 30, 2022 15:40
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.

5 participants