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

Some cleanup changes and commenting #76641

Merged
merged 3 commits into from
Sep 16, 2020
Merged

Conversation

nox
Copy link
Contributor

@nox nox commented Sep 12, 2020

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 12, 2020
@nox
Copy link
Contributor Author

nox commented Sep 12, 2020

@eddyb

Seems like we forgot about nonsensical bounds in nonsensical code.


---- [ui] ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed/auxiliary"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
error[E0161]: cannot move a value of type str: the size of str cannot be statically determined
  --> /checkout/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs:10:18
   |
LL |     let x = vec![*"1"];
   |                  ^^^^

error: aborting due to previous error

That test does str: Copy hah.

@nox
Copy link
Contributor Author

nox commented Sep 12, 2020

I'll change that commit to be adding a comment explaining why we can't fast-path types that are trivially !Sized.

@jyn514 jyn514 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 12, 2020
@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. I-compiletime Issue: Problems and improvements with respect to compile times. A-typesystem Area: The type system labels Sep 12, 2020
@nox nox changed the title Improve the fast path of is_sized and drive-by improve a few things Some cleanup changes and commenting Sep 12, 2020
@nox
Copy link
Contributor Author

nox commented Sep 12, 2020

I added a comment on is_trivially_sized. This PR does pretty much nothing now, so you may just want to close it and spare the CI cycles.

@jyn514 jyn514 removed the I-compiletime Issue: Problems and improvements with respect to compile times. label Sep 12, 2020
@eddyb
Copy link
Member

eddyb commented Sep 12, 2020

I want @nikomatsakis to see this (I forgot about trivial bounds too!), but also, we can:

@bors rollup

@jyn514
Copy link
Member

jyn514 commented Sep 12, 2020

@bors r=eddyb rollup

@bors
Copy link
Contributor

bors commented Sep 12, 2020

📌 Commit caf6c92 has been approved by eddyb

@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 Sep 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 12, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 13, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 13, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 16, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#76056 (Add more info for Vec Drain doc)
 - rust-lang#76062 (Vec slice example fix style and show type elision)
 - rust-lang#76262 (Use inline(never) instead of cold)
 - rust-lang#76335 (Make all methods of `Duration` unstably const)
 - rust-lang#76366 (Add Arith Tests in Library)
 - rust-lang#76369 (Move Various str tests in library)
 - rust-lang#76534 (Add doc comments for From impls)
 - rust-lang#76622 (Update bootstrap readme)
 - rust-lang#76641 (Some cleanup changes and commenting)
 - rust-lang#76662 (Fix liballoc test suite for Miri)

Failed merges:

r? `@ghost`
@bors bors merged commit 0bcc96d into rust-lang:master Sep 16, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants