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

add noalias attribute to ~ return values #9071

Closed
wants to merge 1 commit into from
Closed

add noalias attribute to ~ return values #9071

wants to merge 1 commit into from

Conversation

thestinger
Copy link
Contributor

This also removes a FIXME I added referring to a now closed issue.

@huonw
Copy link
Member

huonw commented Sep 9, 2013

Is this valid for ~@mut T, or do these chains not count as aliasing for LLVM?

@sanxiyn
Copy link
Member

sanxiyn commented Sep 9, 2013

@huonw As I understand it does not count as aliasing for LLVM.

@huonw
Copy link
Member

huonw commented Sep 9, 2013

Even:

fn f(x: @mut int) -> (~@mut int, ~@mut int) { (~x, ~x) }

?

@sanxiyn
Copy link
Member

sanxiyn commented Sep 9, 2013

@huonw In that case, f's return value is not ~ pointer at all.

@thestinger
Copy link
Contributor Author

The noalias attribute is does not apply recursively. It's only relevant for the outermost pointer. It's not a generic alias analysis tool as it only works on the outermost pointer on parameters and return values so it's just a nice to have stopgap before TBAA.

bors added a commit that referenced this pull request Sep 9, 2013
This also removes a FIXME I added referring to a now closed issue.
@bors bors closed this Sep 9, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 18, 2022
Uncomment test for rust-lang#8734

I believe the issue was an interaction between rustfix and `span_lint_and_sugg_for_edges`, so this would've been fixed by rust-lang#98261 (Thanks, `@WaffleLapkin!)`

Closes rust-lang#8734

changelog: none
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.

4 participants