Skip to content

Fix associated types in copy implementations#38152

Merged
bors merged 7 commits into
rust-lang:masterfrom
arielb1:special-copy
Jan 5, 2017
Merged

Fix associated types in copy implementations#38152
bors merged 7 commits into
rust-lang:masterfrom
arielb1:special-copy

Conversation

@arielb1

@arielb1 arielb1 commented Dec 4, 2016

Copy link
Copy Markdown
Contributor

Fixes an ICE and an error in checking copy implementations.

r? @nikomatsakis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe separate each arg on its own line?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say just rustfmt this new file and be done with it.

@mrhota

mrhota commented Dec 4, 2016

Copy link
Copy Markdown
Contributor

curiously, the test will ICE immediately with Stable rustc on play.rust-lang.org, but will timeout with beta and nightly.

Comment thread src/librustc/ty/util.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-existing, but it seems like it would be nice to give both the variant name and the field name -- can we do that instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say just rustfmt this new file and be done with it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file all code collected from other places, or did you make changes to it? I couldn't tell.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code moved from coherence::mod.

@arielb1

arielb1 commented Dec 9, 2016

Copy link
Copy Markdown
Contributor Author

How do you rustfmt?

@nikomatsakis

Copy link
Copy Markdown
Contributor

@arielb1 cargo install rustfmt, then run it on the file I think

@bors

bors commented Dec 21, 2016

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #38099) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis

Copy link
Copy Markdown
Contributor

@arielb1 if you don't feel like running rustfmt, no biggy, but let's rebase :)

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jan 3, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 14efebc has been approved by nikomatsakis

@arielb1

arielb1 commented Jan 3, 2017

Copy link
Copy Markdown
Contributor Author

I was just going to rustfmt the new file and add better error reporting.

@bors r-

Comment thread src/test/compile-fail/E0204.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make this a ui test? I'd like to see precisely where the span is, since it's critical to the message

Span the affected fields instead of reporting the field/variant name.
--> $DIR/E0204.rs:27:6
|
23 | Bar { x: Vec<u32> },
| ----------- this field does not implement `Copy`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great :)

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jan 3, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 4cab293 has been approved by nikomatsakis

@bors

bors commented Jan 3, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 4cab293 with merge be89c6b...

@bors

bors commented Jan 3, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

this makes error messages consistent across architectures
@arielb1

arielb1 commented Jan 4, 2017

Copy link
Copy Markdown
Contributor Author

@bors r=nikomatsakis

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 5fad51e has been approved by nikomatsakis

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5fad51e with merge 5e8f802...

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@arielb1

arielb1 commented Jan 4, 2017

Copy link
Copy Markdown
Contributor Author

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5fad51e with merge 4f1a16e...

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@bluss

bluss commented Jan 4, 2017

Copy link
Copy Markdown
Contributor

Network Error:

fatal: clone of 'https://github.com/rust-lang/llvm.git' into submodule path '/Users/travis/build/rust-lang/rust/src/llvm' failed

@bors retry

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5fad51e with merge 60812a8...

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5fad51e with merge 7bd015d...

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5fad51e with merge 2b62184...

@bors

bors commented Jan 4, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@arielb1

arielb1 commented Jan 4, 2017

Copy link
Copy Markdown
Contributor Author

@bors

bors commented Jan 5, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5fad51e with merge 90618ce...

@bors

bors commented Jan 5, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@arielb1

arielb1 commented Jan 5, 2017

Copy link
Copy Markdown
Contributor Author
The command "if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
    echo skipping, not a full build;
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
    git submodule update --init &&
    src/ci/run.sh;
else
    git submodule update --init &&
    src/ci/docker/run.sh $IMAGE;
fi
" exited with 129.

cc @alexcrichton

@bors retry

@bors

bors commented Jan 5, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5fad51e with merge 74e5b7d...

bors added a commit that referenced this pull request Jan 5, 2017
Fix associated types in copy implementations

Fixes an ICE and an error in checking copy implementations.

r? @nikomatsakis
@bors

bors commented Jan 5, 2017

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 74e5b7d to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants