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

Give better error when collecting into &[T] #111612

Merged
merged 1 commit into from
May 22, 2023

Conversation

ChayimFriedman2
Copy link
Contributor

The detection of slice reference of {integral} in rustc_on_unimplemented is hacky, but a proper solution requires changing FmtPrinter to add a parameter to print integers as {integral} and I didn't want to change it just for rustc_on_unimplemented. I can do that if requested, though.

I'm open to better wording; this is the best I could come up with.

@rustbot
Copy link
Collaborator

rustbot commented May 15, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@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 15, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 15, 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

@ChayimFriedman2 ChayimFriedman2 force-pushed the collect-into-slice-ref branch from 6357b6f to 83930ec Compare May 15, 2023 18:17
@ChayimFriedman2 ChayimFriedman2 changed the title Give better error when collection into &[T] Give better error when collecting into &[T] May 15, 2023
@clubby789 clubby789 added the A-diagnostics Area: Messages for errors, warnings, and lints label May 15, 2023
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 22, 2023

📌 Commit 83930ec 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 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#111501 (MIR drive-by cleanups)
 - rust-lang#111609 (Mark internal functions and traits unsafe to reflect preconditions)
 - rust-lang#111612 (Give better error when collecting into `&[T]`)
 - rust-lang#111756 (Rename `{drop,forget}_{copy,ref}` lints to more consistent naming)
 - rust-lang#111843 (move lcnr to only review types stuff)
 - rust-lang#111844 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit df8b0df into rust-lang:master May 22, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 22, 2023
@ChayimFriedman2 ChayimFriedman2 deleted the collect-into-slice-ref branch May 23, 2023 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants