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 5 pull requests #118821

Closed
wants to merge 18 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

anforowicz and others added 18 commits December 8, 2023 19:42
The new flag has been described in the Major Change Proposal at
rust-lang/compiler-team#656
The test expectations don't apply to WASM, where the target spec
has a different default value of `default_hidden_visibility`.
See the test comments for more details.
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Before: http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/

After: http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/

Profile: http://notriddle.com/rustdoc-html-demo-6/tor-profile/

As a bit of background information: in type-based queries, a type
name that does not exist gets treated as a generic type variable.

This causes a counterintuitive behavior in the `tor_config` crate,
which has a trait with an associated type variable called `T`.

This isn't a searchable concrete type, but its name still gets stored
in the typeNameIdMap, as a convenient way to intern its name.
…ty, r=TaKO8Ki

Add unstable `-Zdefault-hidden-visibility` cmdline flag for `rustc`.

The new flag has been described in the Major Change Proposal at
rust-lang/compiler-team#656
…rtialEq, r=compiler-errors

Restore `const PartialEq`

And thus fixes a number of tests. There is a bug that still needs to be fixed, so WIP for now.

r? ``@compiler-errors``
…KO8Ki

Remove edition umbrella features.

In the 2018 edition, there was an "umbrella" feature `#[feature(rust_2018_preview)]` which was used to enable several other features at once. This umbrella mechanism was not used in the 2021 edition and likely will not be used in 2024 either. During 2018 users reported that setting the feature was awkward, especially since they already needed to opt-in via the edition mechanism.

This PR removes this mechanism because I believe it will not be used (and will clean up and simplify the code). I believe that there are better ways to handle features and editions. In short:

- For highly experimental features, that may or may not be involved in an edition, they can implement regular feature gates like `tcx.features().my_feature`.
- For experimental features that *might* be involved in an edition, they should implement gates with `tcx.features().my_feature && span.at_least_rust_20xx()`. This requires the user to still specify `#![feature(my_feature)]`, to avoid disrupting testing of other edition features which are ready and have been accepted within the edition.
- For experimental features that have graduated to definitely be part of an edition, they should implement gates with `tcx.features().my_feature || span.at_least_rust_20xx()`, or just remove the feature check altogether and just check `span.at_least_rust_20xx()`.
- For relatively simple changes, they can skip the whole feature gating thing and just check `span.at_least_rust_20xx()`, and rely on the instability of the edition itself (which requires `-Zunstable-options`) to gate it.

I am working on documenting all of this in the rustc-dev-guide.
…ern, r=GuillaumeGomez

rustdoc-search: do not treat associated type names as types

[Before](http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)

[After](http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)

[Profile](http://notriddle.com/rustdoc-html-demo-6/tor-profile/index.html)

As a bit of background information: in type-based queries, a type name that does not exist gets treated as a generic type variable.

This causes a counterintuitive behavior in the `tor_config` crate, which has a trait with an associated type variable called `T`.

This isn't a searchable concrete type, but its name still gets stored in the typeNameIdMap, as a convenient way to intern its name.

(The second commit is a mostly unrelated bugfix.)
@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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 11, 2023
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Dec 11, 2023

📌 Commit df7d23c has been approved by GuillaumeGomez

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 Dec 11, 2023
@bors
Copy link
Contributor

bors commented Dec 11, 2023

⌛ Testing commit df7d23c with merge 500c006...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2023
…llaumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#118417 (Add unstable `-Zdefault-hidden-visibility` cmdline flag for `rustc`.)
 - rust-lang#118661 (Restore `const PartialEq`)
 - rust-lang#118802 (Remove edition umbrella features.)
 - rust-lang#118807 (Remove an allocation in min_stack)
 - rust-lang#118812 (rustdoc-search: do not treat associated type names as types)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Dec 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 Dec 11, 2023
@rust-log-analyzer
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain)

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

---- [codegen] tests/codegen/default-hidden-visibility.rs#DEFAULT stdout ----

error in revision `DEFAULT`: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.DEFAULT/default-hidden-visibility.ll" "/checkout/tests/codegen/default-hidden-visibility.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC,DEFAULT" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/default-hidden-visibility.rs:32:13: error: DEFAULT: expected string not found in input
/checkout/tests/codegen/default-hidden-visibility.rs:32:13: error: DEFAULT: expected string not found in input
// DEFAULT: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = constant
            ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.DEFAULT/default-hidden-visibility.ll:1:1: note: scanning from here
; ModuleID = 'default_hidden_visibility.1616fc4eed67881b-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.DEFAULT/default-hidden-visibility.ll:6:1: note: possible intended match here
@_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE = internal constant <{ [6 x i8] }> <{ [6 x i8] c"foobar" }>, align 1


Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.DEFAULT/default-hidden-visibility.ll
Check file: /checkout/tests/codegen/default-hidden-visibility.rs

-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'default_hidden_visibility.1616fc4eed67881b-cgu.0' 
check:32'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: source_filename = "default_hidden_visibility.1616fc4eed67881b-cgu.0" 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: target triple = "i686-unknown-linux-musl" 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  
check:32'0     ~
            6: @_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE = internal constant <{ [6 x i8] }> <{ [6 x i8] c"foobar" }>, align 1 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:32'1     ?                                                                                                                                          possible intended match
            7: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE], section "llvm.metadata" 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8:  
check:32'0     ~
            9: !llvm.module.flags = !{!0, !1} 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10: !llvm.ident = !{!2} 
check:32'0     ~~~~~~~~~~~~~~~~~~~~
           11:  
check:32'0     ~
           12: !0 = !{i32 8, !"PIC Level", i32 2} 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           13: !1 = !{i32 7, !"PIE Level", i32 2} 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           14: !2 = !{!"rustc version 1.76.0-nightly (500c006c8 2023-12-11)"} 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------



---- [codegen] tests/codegen/default-hidden-visibility.rs#NO stdout ----

error in revision `NO`: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.NO/default-hidden-visibility.ll" "/checkout/tests/codegen/default-hidden-visibility.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC,NO" "--dump-input-context" "100"
--- stderr -------------------------------
--- stderr -------------------------------
/checkout/tests/codegen/default-hidden-visibility.rs:34:8: error: NO: expected string not found in input
// NO: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = constant
       ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.NO/default-hidden-visibility.ll:1:1: note: scanning from here
; ModuleID = 'default_hidden_visibility.1616fc4eed67881b-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.NO/default-hidden-visibility.ll:6:1: note: possible intended match here
@_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE = internal constant <{ [6 x i8] }> <{ [6 x i8] c"foobar" }>, align 1


Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.NO/default-hidden-visibility.ll
Check file: /checkout/tests/codegen/default-hidden-visibility.rs

-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'default_hidden_visibility.1616fc4eed67881b-cgu.0' 
check:34'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: source_filename = "default_hidden_visibility.1616fc4eed67881b-cgu.0" 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: target triple = "i686-unknown-linux-musl" 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  
check:34'0     ~
            6: @_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE = internal constant <{ [6 x i8] }> <{ [6 x i8] c"foobar" }>, align 1 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:34'1     ?                                                                                                                                          possible intended match
            7: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE], section "llvm.metadata" 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8:  
check:34'0     ~
            9: !llvm.module.flags = !{!0, !1} 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10: !llvm.ident = !{!2} 
check:34'0     ~~~~~~~~~~~~~~~~~~~~
           11:  
check:34'0     ~
           12: !0 = !{i32 8, !"PIC Level", i32 2} 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           13: !1 = !{i32 7, !"PIE Level", i32 2} 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           14: !2 = !{!"rustc version 1.76.0-nightly (500c006c8 2023-12-11)"} 
check:34'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------


---- [codegen] tests/codegen/default-hidden-visibility.rs#YES stdout ----
---- [codegen] tests/codegen/default-hidden-visibility.rs#YES stdout ----

error in revision `YES`: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.YES/default-hidden-visibility.ll" "/checkout/tests/codegen/default-hidden-visibility.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC,YES" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/default-hidden-visibility.rs:33:9: error: YES: expected string not found in input
/checkout/tests/codegen/default-hidden-visibility.rs:33:9: error: YES: expected string not found in input
// YES: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = hidden constant
        ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.YES/default-hidden-visibility.ll:1:1: note: scanning from here
; ModuleID = 'default_hidden_visibility.1616fc4eed67881b-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.YES/default-hidden-visibility.ll:6:1: note: possible intended match here
@_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE = internal constant <{ [6 x i8] }> <{ [6 x i8] c"foobar" }>, align 1


Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/default-hidden-visibility.YES/default-hidden-visibility.ll
Check file: /checkout/tests/codegen/default-hidden-visibility.rs

-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'default_hidden_visibility.1616fc4eed67881b-cgu.0' 
check:33'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: source_filename = "default_hidden_visibility.1616fc4eed67881b-cgu.0" 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: target triple = "i686-unknown-linux-musl" 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  
check:33'0     ~
            6: @_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE = internal constant <{ [6 x i8] }> <{ [6 x i8] c"foobar" }>, align 1 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:33'1     ?                                                                                                                                          possible intended match
            7: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZN25default_hidden_visibility15exported_symbol17hf0c8d0f5d6fa017eE], section "llvm.metadata" 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8:  
check:33'0     ~
            9: !llvm.module.flags = !{!0, !1} 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10: !llvm.ident = !{!2} 
check:33'0     ~~~~~~~~~~~~~~~~~~~~
           11:  
check:33'0     ~
           12: !0 = !{i32 8, !"PIC Level", i32 2} 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           13: !1 = !{i32 7, !"PIE Level", i32 2} 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           14: !2 = !{!"rustc version 1.76.0-nightly (500c006c8 2023-12-11)"} 
check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------



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. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants