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

Revert "Populate effective visibilities in rustc_privacy" #111371

Merged
merged 2 commits into from
May 9, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented May 8, 2023

This reverts commit cff85f2, cc #110907. It needs to be fixed, but there are too many issues being reported that I wanted to put up a revert until a proper fix can be committed.

Fixes a ton of issues where private but still reachable impls were missing during codegen:
Fixes #111320
Fixes #111321
Fixes #111334
Fixes #111357
Fixes #111368
Fixes #111373
Fixes #111377
Fixes #111386
Fixes #111387
Fixes #111391

@bors p=1

r? @petrochenkov

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 8, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 8, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 9, 2023

📌 Commit 5fcf2e6 has been approved by petrochenkov

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 9, 2023
@fmease
Copy link
Member

fmease commented May 9, 2023

bors didn't register the priority of 1 from the PR description

@FurryAcetylCoA
Copy link

It seems that reverting changes in library/core/src/iter/adapters/flatten.rs prevents the rustc compiler from successfully bootstrapping with the latest nightly build as stage0 compiler.

I'm using rustc 1.71.0-nightly (2f2c438dc 2023-05-08) and got the following error

error output
error: struct has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:313:1
    |
313 | / struct FlattenCompat<I, U> {
314 | |     iter: Fuse<I>,
315 | |     frontiter: Option<U>,
316 | |     backiter: Option<U>,
317 | | }
    | |_^

error: implementation has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:312:10
    |
312 |   #[derive(Clone, Debug)]
    |            ^^^^^ in this derive macro expansion
    |
   ::: library/core/src/clone.rs:138:1
    |
138 | / pub macro Clone($item:item) {
139 | |     /* compiler built-in */
140 | | }
    | |_- in this expansion of `#[derive(Clone)]`

error: implementation has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:312:17
    |
312 |   #[derive(Clone, Debug)]
    |                   ^^^^^ in this derive macro expansion
    |
   ::: library/core/src/fmt/mod.rs:588:5
    |
588 | /     pub macro Debug($item:item) {
589 | |         /* compiler built-in */
590 | |     }
    | |_____- in this expansion of `#[derive(Debug)]`
error: implementation has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:466:1
    |
466 | / impl<I, U> Iterator for FlattenCompat<I, U>
467 | | where
468 | |     I: Iterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
469 | |     U: Iterator,
...   |
577 | |     }
578 | | }
    | |_^

error: implementation has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:580:1
    |
580 | / impl<I, U> DoubleEndedIterator for FlattenCompat<I, U>
581 | | where
582 | |     I: DoubleEndedIterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
583 | |     U: DoubleEndedIterator,
...   |
646 | |     }
647 | | }
    | |_^

error: implementation has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:649:1
    |
649 | / unsafe impl<const N: usize, I, T> TrustedLen
650 | |     for FlattenCompat<I, <[T; N] as IntoIterator>::IntoIter>
651 | | where
652 | |     I: TrustedLen<Item = [T; N]>,
653 | | {
654 | | }
    | |_^

error: implementation has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:656:1
    |
656 | / unsafe impl<'a, const N: usize, I, T> TrustedLen
657 | |     for FlattenCompat<I, <&'a [T; N] as IntoIterator>::IntoIter>
658 | | where
659 | |     I: TrustedLen<Item = &'a [T; N]>,
660 | | {
661 | | }
    | |_^

error: implementation has missing stability attribute
   --> library/core/src/iter/adapters/flatten.rs:663:1
    |
663 | / unsafe impl<'a, const N: usize, I, T> TrustedLen
664 | |     for FlattenCompat<I, <&'a mut [T; N] as IntoIterator>::IntoIter>
665 | | where
666 | |     I: TrustedLen<Item = &'a mut [T; N]>,
667 | | {
668 | | }
    | |_^

error: could not compile `core` (lib) due to 8 previous errors

@compiler-errors
Copy link
Member Author

@bors p=1

@KamilaBorowska
Copy link
Contributor

KamilaBorowska commented May 9, 2023

It seems that reverting changes in library/core/src/iter/adapters/flatten.rs prevents the rustc compiler from successfully bootstrapping with the latest nightly build as stage0 compiler.

I'm using rustc 1.71.0-nightly (2f2c438dc 2023-05-08) and got the following error
error output

This is fine, Rust standard library can only be compiled with Rust beta or Rust compiler from the same commit (other compilers may work, but it's not guaranteed). Rebuild your stage1 compiler, and it should work fine.

@Dylan-DPC
Copy link
Member

@bors p=1000

(the github issue seems fixed so using this to test that :P )

@bors
Copy link
Contributor

bors commented May 9, 2023

⌛ Testing commit 5fcf2e6 with merge 3a37c2f...

@petrochenkov
Copy link
Contributor

cc @Bryanskiy

@bors
Copy link
Contributor

bors commented May 9, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 3a37c2f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 9, 2023
@bors bors merged commit 3a37c2f into rust-lang:master May 9, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 9, 2023
@compiler-errors
Copy link
Member Author

@bors treeclosed-

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3a37c2f): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-1.5%, -0.2%] 55
Improvements ✅
(secondary)
-0.5% [-0.7%, -0.2%] 10
All ❌✅ (primary) -0.5% [-1.5%, -0.2%] 55

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.2% [1.0%, 1.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 2
All ❌✅ (primary) 1.2% [1.0%, 1.3%] 3

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
8.5% [1.5%, 10.8%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 658.646s -> 657.767s (-0.13%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment