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

Rollup of 6 pull requests #111464

Closed
wants to merge 16 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GilShoshan94 and others added 16 commits May 3, 2023 14:53
use implied bounds when checking opaque types

During opaque type inference, we check for the well-formedness of the hidden type in the opaque type's own environment, not the one of the defining site, which are different in the case of TAIT.

However in the case of associated-type-impl-trait, we don't use implied bounds from the impl header. This caused us to reject the following:
```rust
trait Service<Req> {
    type Output;
    fn call(req: Req) -> Self::Output;
}

impl<'a, Req> Service<&'a Req> for u8 {
    type Output= impl Sized; // we can't prove WF of hidden type  `WF(&'a Req)` although it's implied by the impl
    //~^ ERROR type parameter Req doesn't live long enough
    fn call(req: &'a Req) -> Self::Output {
        req
    }
}
```

although adding an explicit bound would make it pass:
```diff
- impl<'a, Req> Service<&'a Req> for u8 {
+ impl<'a, Req> Service<&'a Req> for u8  where Req: 'a, {
```

I believe it should pass as we already allow the concrete type to be used:
```diff
impl<'a, Req> Service<&'a Req> for u8 {
-    type Output= impl Sized;
+    type Output= &'a Req;
```

Fixes rust-lang#95922

Builds on rust-lang#105982

cc `@lcnr` (because implied bounds)

r? `@oli-obk`
…i-obk

Don't lint snake-case on executable crate name

Fix rust-lang#45127

Hi,
First PR on Rust, I tried my best to follow "Rust Compiler Development Guide".

I tested it with a custom toolchain on a dummy bin crate with one submodule and it seems to work.
The lint `non_snake_case` ignore the binary crate name but not the module name.

Thank you `@Manishearth` and `@jyn514` for the guidance !
…r=lcnr

Make `NonUseContext::AscribeUserTy` carry `ty::Variance`

Close rust-lang#108267
Verify copies of mutable pointers in 2 stages in ReferencePropagation

Fixes rust-lang#111422

In the first stage, we mark the copies as reborrows, to be checked later.
In the second stage, we walk the reborrow chains to verify that all stages are fully replacable.

The replacement itself mirrors the check, and iterates through the reborrow chain.

r? `@RalfJung`
cc `@JakobDegen`
Only warn single-use lifetime when the binders match.

Fixes rust-lang#111400
Update cargo

2 commits in 26b73d15a68fb94579f6d3590585ec0e9d81d3d5..13413c64ff88dd6c2824e9eb9374fc5f10895d28
2023-05-09 20:28:03 +0000 to 2023-05-10 13:46:18 +0000

* Update libc to 0.2.144 (rust-lang/cargo#12098)
* changelog: add entries of some behavior changes (rust-lang/cargo#12119)

r? `@weihanglo`
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels May 11, 2023
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented May 11, 2023

📌 Commit 5f66444 has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 11, 2023
@bors
Copy link
Contributor

bors commented May 11, 2023

⌛ Testing commit 5f66444 with merge 0f1677ffa81b7491b2df76338b9b93b73e244825...

@bors
Copy link
Contributor

bors commented May 11, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 11, 2023
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@Dylan-DPC
Copy link
Member Author

@bors retry
@bors treeclosed=100

@Dylan-DPC
Copy link
Member Author

@bors p=101

@bors
Copy link
Contributor

bors commented May 11, 2023

⌛ Testing commit 5f66444 with merge 017120df8e1eb519d0a076825f73c35fd843f8a1...

@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
diff of stderr:

+ warning: dropping unsupported crate type `dylib` for target `wasm32-unknown-unknown`
+ 
1 error: crate `NonSnakeCase` should have a snake case name
3    |

10 LL | #![deny(non_snake_case)]
11    |         ^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args lint/lint-non-snake-case-crate-dylib.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lint/lint-non-snake-case-crate-dylib.rs" "-Zthreads=1" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=wasm32-unknown-unknown" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/lint-non-snake-case-crate-dylib" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/lint-non-snake-case-crate-dylib/auxiliary"
stdout: none
warning: dropping unsupported crate type `dylib` for target `wasm32-unknown-unknown`


error: crate `NonSnakeCase` should have a snake case name
  --> fake-test-src-base/lint/lint-non-snake-case-crate-dylib.rs:2:18
   |
LL | #![crate_name = "NonSnakeCase"]
   |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
note: the lint level is defined here
  --> fake-test-src-base/lint/lint-non-snake-case-crate-dylib.rs:4:9
   |
LL | #![deny(non_snake_case)]
---
diff of stderr:

+ warning: dropping unsupported crate type `proc-macro` for target `wasm32-unknown-unknown`
+ 
1 error: crate `NonSnakeCase` should have a snake case name
3    |

10 LL | #![deny(non_snake_case)]
11    |         ^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args lint/lint-non-snake-case-crate-proc-macro.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lint/lint-non-snake-case-crate-proc-macro.rs" "-Zthreads=1" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=wasm32-unknown-unknown" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/lint-non-snake-case-crate-proc-macro" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/lint-non-snake-case-crate-proc-macro/auxiliary"
stdout: none
warning: dropping unsupported crate type `proc-macro` for target `wasm32-unknown-unknown`


error: crate `NonSnakeCase` should have a snake case name
  --> fake-test-src-base/lint/lint-non-snake-case-crate-proc-macro.rs:2:18
   |
LL | #![crate_name = "NonSnakeCase"]
   |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
note: the lint level is defined here
  --> fake-test-src-base/lint/lint-non-snake-case-crate-proc-macro.rs:4:9
   |
LL | #![deny(non_snake_case)]

@bors
Copy link
Contributor

bors commented May 11, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 11, 2023
@compiler-errors
Copy link
Member

@bors treeclosed-

@Dylan-DPC Dylan-DPC closed this May 12, 2023
@Dylan-DPC Dylan-DPC deleted the rollup-egjgwoc branch May 12, 2023 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants