Skip to content

Some cleanup changes and commenting - #76641

Merged
bors merged 3 commits into
rust-lang:masterfrom
nox:pointee-random-stuff
Sep 16, 2020
Merged

Some cleanup changes and commenting#76641
bors merged 3 commits into
rust-lang:masterfrom
nox:pointee-random-stuff

Conversation

@nox

@noxnox commented Sep 12, 2020

Copy link
Copy Markdown
Contributor

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 12, 2020
@nox
noxforce-pushed the pointee-random-stuff branch from 96d770d to ff5c5a6CompareSeptember 12, 2020 12:24
@nox

nox commented Sep 12, 2020

Copy link
Copy Markdown
ContributorAuthor

@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

nox commented Sep 12, 2020

Copy link
Copy Markdown
ContributorAuthor

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

@jyn514jyn514 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 12, 2020
Comment threadcompiler/rustc_middle/src/ty/sty.rs Outdated
@jyn514jyn514 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-type-system Area: Type system labels Sep 12, 2020
@nox
noxforce-pushed the pointee-random-stuff branch from ff5c5a6 to caf6c92CompareSeptember 12, 2020 16:36
@noxnox changed the title Improve the fast path of is_sized and drive-by improve a few thingsSome cleanup changes and commentingSep 12, 2020
@nox

nox commented Sep 12, 2020

Copy link
Copy Markdown
ContributorAuthor

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.

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

Copy link
Copy Markdown
Contributor

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

@bors rollup

@jyn514

Copy link
Copy Markdown
Member

@bors r=eddyb rollup

@bors

bors commented Sep 12, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit caf6c92 has been approved by eddyb

@borsbors 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
@RalfJungRalfJung mentioned this pull request Sep 13, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 13, 2020
@RalfJungRalfJung mentioned 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
@RalfJungRalfJung mentioned 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:masterSep 16, 2020
@rustbotrustbot added this to the 1.48.0 milestone Sep 16, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-type-systemArea: Type systemC-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

7 participants

@nox@eddyb@jyn514@bors@nikomatsakis@rust-highfive@rustbot