Skip to content

A few minor clean-ups to the rt code #8854

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

Merged
merged 4 commits into from
Aug 30, 2013
Merged

Conversation

huonw
Copy link
Member

@huonw huonw commented Aug 29, 2013

The only user-facing change is handling non-integer (and zero) RUST_THREADS more nicely:

$ RUST_THREADS=x rustc # old

You've met with a terrible fate, haven't you?

fatal runtime error: runtime tls key not initialized
Aborted
$ RUST_THREADS=x ./x86_64-unknown-linux-gnu/stage2/bin/rustc # new

You've met with a terrible fate, haven't you?

fatal runtime error: `RUST_THREADS` is `x`, should be a positive integer
Aborted

The other changes are converting some for .. in range(x,y) to vec::from_fn or for .. in x.iter() as appropriate; and removing a chain of (seemingly) unnecessary pointer casts.

(Also, fixes a typo in extra::test from #8823.)

@huonw
Copy link
Member Author

huonw commented Aug 29, 2013

r? @brson

huonw added 4 commits August 29, 2013 22:55
Previously it would call Option.unwrap(), which calls `fail!` on None,
which doesn't work without the runtime (e.g. when initialising it).
bors added a commit that referenced this pull request Aug 30, 2013
The only user-facing change is handling non-integer (and zero) `RUST_THREADS` more nicely:

```
$ RUST_THREADS=x rustc # old

You've met with a terrible fate, haven't you?

fatal runtime error: runtime tls key not initialized
Aborted
$ RUST_THREADS=x ./x86_64-unknown-linux-gnu/stage2/bin/rustc # new

You've met with a terrible fate, haven't you?

fatal runtime error: `RUST_THREADS` is `x`, should be a positive integer
Aborted
```

The other changes are converting some `for .. in range(x,y)` to `vec::from_fn` or `for .. in x.iter()` as appropriate; and removing a chain of (seemingly) unnecessary pointer casts.

(Also, fixes a typo in `extra::test` from #8823.)
@bors bors closed this Aug 30, 2013
@bors bors merged commit 4fea236 into rust-lang:master Aug 30, 2013
@huonw huonw deleted the rt-papercuts branch November 25, 2013 10:55
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 11, 2022
Use `check_proc_macro` for `missing_const_for_fn`

This uses `@Jarcho's` rust-lang#8694 implementation to fix `missing_const_for_fn` linting in proc-macros.
I'm not 100% sure what I'm doing here, any feedback is appreciated.

Previously: Jarcho/rust-clippy#1.
Fixes rust-lang#8854.

changelog: [`missing_const_for_fn`]: No longer lints in proc-macros
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.

3 participants