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

Typestate for snapshot #397

Closed

Conversation

catamorphism
Copy link
Contributor

No description provided.

Change ty_fn to have a controlflow field. A 'controlflow' is
essentially a bit of data that says whether or not this function
never returns to the caller (if it never returns, that means it calls
"fail" or another "never-returns" function on every control path).

Also add syntax for annotating functions that never return:

fn foo() -> ! {
   fail;
}

for example. Functions marked with ! implicitly have a result type of
ty_bot, which is a new type that this commit also adds.
(in preparation for changing the "function may not return" warning
to an error)
@graydon
Copy link
Contributor

graydon commented May 26, 2011

Still want this landed?

@catamorphism
Copy link
Contributor Author

I think I pushed it already?

kazcw pushed a commit to kazcw/rust that referenced this pull request Oct 23, 2018
Turns out Cargo doesn't automatically set `TARGET` for rustc invocations so
carry it forward manually from the build script over to the rustc invocation.
dlrobertson pushed a commit to dlrobertson/rust that referenced this pull request Nov 29, 2018
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Oct 26, 2020
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this pull request Mar 7, 2023
* Handle dupnoneed in forward mode

* Fix allocs with more than one parameter (rust-lang#397)

* Add test
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this pull request Mar 7, 2023
* Fix allocs with more than one parameter (rust-lang#397)

* fix allocation functions with more than one argument

* add test

* fix test

* Handle custom forward

* Handle integer memcpy in forward

Co-authored-by: Tim Gymnich <timgymnich@me.com>
Co-authored-by: Tim Gymnich <tgymnich@icloud.com>
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this pull request Feb 21, 2024
dpaoliello pushed a commit to dpaoliello/rust that referenced this pull request Mar 22, 2024
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.

None yet

2 participants