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 #99150

Closed
wants to merge 14 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

nvzqz and others added 14 commits June 7, 2022 14:53
User crates currently produce much more code than necessary because the
optimizer fails to make assumptions about this method.
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Inline Windows `OsStrExt::encode_wide`

User crates currently produce much more code than necessary because the optimizer fails to make assumptions about this method.
…-obk

Deny float const params even when `adt_const_params` is enabled

Supersedes rust-lang#98825
Fixes rust-lang#98813

r? `@oli-obk`
core::any: replace some generic types with impl Trait

This gives a cleaner API since the caller only specifies the concrete type they usually want to.

r? `@yaahc`
…d-stay-private, r=lcnr

Do not mention private types from other crates as impl candidates

Fixes rust-lang#99080
…n, r=fee1-dead

Implement `SourceMap::is_accessible_span`

This patch adds `SourceMap::is_accessible_span` and replaces `span_to_snippet(span).is_ok()` and `span_to_snippet(span).is_err()` with it. This removes a `&str` to `String` conversion.
Mention similarly named associated type even if it's not clearly in supertrait

Due to query cycle avoidance, we sometimes restrict the candidates in `complain_about_assoc_type_not_found` too much so that we can't detect typo replacements from just supertraits.

This creates a more general note of the existence of a similarly named associated type from _all_ visible traits when possible.

Fixes rust-lang#55673
@rustbot rustbot added 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. rollup A PR which is a rollup labels Jul 11, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 11, 2022

📌 Commit 96c969c has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 11, 2022
@bors
Copy link
Contributor

bors commented Jul 11, 2022

⌛ Testing commit 96c969c with merge fc43e58343a3e787ef537946585d05fc1e5e7af4...

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rand v0.7.3
    Checking std v0.0.0 (/checkout/library/std)
    Checking core v0.0.0 (/checkout/library/core)
    Checking alloc v0.0.0 (/checkout/library/alloc)
error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
145 |             .provide_value::<String, _>(|| "bye".to_owned());
    |              ^^^^^^^^^^^^^           - help: remove this generic argument
    |              expected 1 generic argument
    |
    |
note: associated function defined here, with 1 generic parameter: `T`
    |
    |
901 |     pub fn provide_value<T>(&mut self, fulfil: impl FnOnce() -> T) -> &mut Self
    |            ^^^^^^^^^^^^^ -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
185 |         request_ref::<T, _>(self)
    |         ^^^^^^^^^^^      - help: remove this generic argument
    |         expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
154 |     assert_eq!(&**request_ref::<String, _>(obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^           - help: remove this generic argument
    |                   expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
155 |     assert_eq!(&*request_value::<String, _>(obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^           - help: remove this generic argument
    |                  expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
156 |     assert_eq!(request_value::<u8, _>(obj), None);
    |                ^^^^^^^^^^^^^       - help: remove this generic argument
    |                expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
164 |     assert_eq!(&**request_ref::<String, _>(&*obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^           - help: remove this generic argument
    |                   expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
165 |     assert_eq!(&*request_value::<String, _>(&*obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^           - help: remove this generic argument
    |                  expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
166 |     assert_eq!(request_value::<u8, _>(&*obj), None);
    |                ^^^^^^^^^^^^^       - help: remove this generic argument
    |                expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
174 |     assert_eq!(&**request_ref::<String, _>(&obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^           - help: remove this generic argument
    |                   expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
175 |     assert_eq!(&*request_value::<String, _>(&obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^           - help: remove this generic argument
    |                  expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
176 |     assert_eq!(request_value::<u8, _>(&obj), None);
    |                ^^^^^^^^^^^^^       - help: remove this generic argument
    |                expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument
For more information about this error, try `rustc --explain E0107`.
error: could not compile `core` due to 11 previous errors
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:01:39

@bors
Copy link
Contributor

bors commented Jul 11, 2022

💔 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 Jul 11, 2022
@Dylan-DPC Dylan-DPC closed this Jul 11, 2022
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rand v0.7.3
    Checking core v0.0.0 (/checkout/library/core)
    Checking std v0.0.0 (/checkout/library/std)
    Checking alloc v0.0.0 (/checkout/library/alloc)
error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
145 |             .provide_value::<String, _>(|| "bye".to_owned());
    |              ^^^^^^^^^^^^^           - help: remove this generic argument
    |              expected 1 generic argument
    |
    |
note: associated function defined here, with 1 generic parameter: `T`
    |
    |
901 |     pub fn provide_value<T>(&mut self, fulfil: impl FnOnce() -> T) -> &mut Self
    |            ^^^^^^^^^^^^^ -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
185 |         request_ref::<T, _>(self)
    |         ^^^^^^^^^^^      - help: remove this generic argument
    |         expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
154 |     assert_eq!(&**request_ref::<String, _>(obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^           - help: remove this generic argument
    |                   expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
155 |     assert_eq!(&*request_value::<String, _>(obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^           - help: remove this generic argument
    |                  expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
156 |     assert_eq!(request_value::<u8, _>(obj), None);
    |                ^^^^^^^^^^^^^       - help: remove this generic argument
    |                expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
164 |     assert_eq!(&**request_ref::<String, _>(&*obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^           - help: remove this generic argument
    |                   expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
165 |     assert_eq!(&*request_value::<String, _>(&*obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^           - help: remove this generic argument
    |                  expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
166 |     assert_eq!(request_value::<u8, _>(&*obj), None);
    |                ^^^^^^^^^^^^^       - help: remove this generic argument
    |                expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
174 |     assert_eq!(&**request_ref::<String, _>(&obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^           - help: remove this generic argument
    |                   expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
847 | pub fn request_ref<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<&'a T>
    |        ^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
175 |     assert_eq!(&*request_value::<String, _>(&obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^           - help: remove this generic argument
    |                  expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument

error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
    |
    |
176 |     assert_eq!(request_value::<u8, _>(&obj), None);
    |                ^^^^^^^^^^^^^       - help: remove this generic argument
    |                expected 1 generic argument
    |
    |
note: function defined here, with 1 generic parameter: `T`
    |
    |
825 | pub fn request_value<'a, T>(provider: &'a (impl Provider + ?Sized)) -> Option<T>
    |        ^^^^^^^^^^^^^     -
    = note: `impl Trait` cannot be explicitly specified as a generic argument
For more information about this error, try `rustc --explain E0107`.
error: could not compile `core` due to 11 previous errors
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:01:46

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants