Commit Graph

38609 Commits

Author SHA1 Message Date
Manish Goregaokar
237ae450bf Remove obsolete stability attrs from test 2015-02-16 11:49:09 +05:30
Manish Goregaokar
99e39f4927 Clean up visit_attribute in feature_gate.rs
- We shouldn't be using `check_name` here at all
 - `contains_name(ref_slice(foo), bar)` is redundant, `contains_name` just iterates over its first arg and calls `check_name`
 - match would be better than a bunch of ifs
2015-02-16 11:49:09 +05:30
Manish Goregaokar
38542cca29 Feature gate custom attributes (fixes #22203) 2015-02-16 11:49:09 +05:30
Manish Goregaokar
531a06e593 Move ATTRIBUTE_WHITELIST and CRATE_ATTRS to KNOWN_ATTRIBUTES in syntax::feature_gate 2015-02-16 11:49:07 +05:30
Alex Crichton
42053b9ea1 std: Add Vec::from_iter comment
Requested by Niko in #22200 (and is good to have anyway)
2015-02-15 21:04:20 -08:00
Lai Jiangshan
428733dea0 reference: fix outdated link for Compiler plugins
book/syntax-extensions.html was renamed to book/plugins.html,
the link should be also updated.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-02-16 11:18:00 +08:00
bors
c5db290bf6 Auto merge of #22367 - Manishearth:rollup, r=steveklabnik
(still testing locally)
2015-02-16 00:46:43 +00:00
Björn Steinbrink
4808561c45 Fix misoptimizations when matching against strings/slices
When matching against strings/slices, we call the comparison function
for strings, which takes two string slices by value. The slices are
passed in memory, and currently we just pass in a pointer to the
original slice. That can cause misoptimizations because we emit a call
to llvm.lifetime.end for all by-value arguments at the end of a
function, which in this case marks the original slice as dead.

So we need to properly create copies of the slices to pass them to the
comparison function.

Fixes #22008
2015-02-16 00:50:02 +01:00
Manish Goregaokar
cea2bbfe27 Fix grammar 2015-02-16 03:56:52 +05:30
Thiago Carvalho
9783cc2822 improve text 2015-02-15 20:41:44 +01:00
Alexander Bliskovsky
74ba529701 Added explanation to trpl of integer types. 2015-02-15 13:51:36 -05:00
Thiago Carvalho
4cf4e8bc0c glossary 2015-02-15 19:37:49 +01:00
Niko Matsakis
6171c35d6e Change arbirary types from usize to u32. 2015-02-15 11:45:10 -05:00
Richo Healey
74864b30d8 lint: fixup extraneous #[allow]
This snuck through my refactor
2015-02-15 07:50:15 -08:00
bombless
6514c3ab16 Don't panic if there's no command line arguments 2015-02-15 23:40:56 +08:00
Niko Matsakis
8eb38590c9 Audit integer types in finally. 2015-02-15 10:25:13 -05:00
Niko Matsakis
a43daa6366 Audit integer types in result. 2015-02-15 10:24:47 -05:00
Niko Matsakis
d7f673c82e Audit integer types in ops. 2015-02-15 10:22:43 -05:00
Simonas Kazlauskas
690cc139b1 Add styles for docblock tables
Fixes #22357
2015-02-15 15:58:45 +02:00
Manish Goregaokar
f0f8be2a2e Fix rollup (remove slicing_syntax) 2015-02-15 19:26:39 +05:30
Thiago Carvalho
89822e1cbc Book - short explanation of arity 2015-02-15 14:29:40 +01:00
Manish Goregaokar
b1a46db649 Rollup merge of #22247 - Gankro:dlist_split, r=alexcrichton 2015-02-15 18:42:48 +05:30
Manish Goregaokar
97503e1c1e Rollup merge of #22256 - brson:installer-next, r=alexcrichton
Highlights:

* Adds an 'uninstall.sh' script to `/usr/local/lib/rustlib/uninstall.sh`, the path to which is printed during installation.
* Components can be deselected during install, like `install.sh --without=rust-docs`.
* Components can be listed with `install.sh --list-components`.
* Vastly reduces spew during install (but supporting a `--verbose` option).

Typicall install run looks like:

```
brian@brianX1:~/dev/multirust⟫ sudo ./install.sh
[sudo] password for brian:
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rust-docs'

    Rust is ready to roll.
```

Needs to be merged right before corresponding PRs to cargo and rust-packaging.

Fixes https://github.com/rust-lang/rust/issues/21117
Fixes https://github.com/rust-lang/rust/issues/20283
2015-02-15 18:42:48 +05:30
Manish Goregaokar
16b24f15bd Rollup merge of #22285 - kmcallister:pub-macro, r=nick29581
It's not clear what this means, because a macro in item position can expand to zero or more items.  For now we disallow it, which is technically a

    [breaking-change]

but is landing without an RFC.  The `pub` keyword previously had no effect, which seems quite unintended.

Fixes #18317.
Fixes #14660.
2015-02-15 18:42:48 +05:30
Manish Goregaokar
ed728ec145 Rollup merge of #22292 - brson:alpha2, r=alexcrichton 2015-02-15 18:42:47 +05:30
Manish Goregaokar
8111d65afc Rollup merge of #22293 - steveklabnik:gh12891, r=brson
Fixes #12891.
2015-02-15 18:42:47 +05:30
Manish Goregaokar
ed58399449 Rollup merge of #22297 - nagisa:spring-cleanup, r=alexcrichton
This PR replaces uses of `os::getenv` with newly introduced `env::var{,_os}`.

Mostly did this as a background activity to procrastinate from procrastinating.

Tests appear to build and run fine. This includes benchmarks from test/bench directory.
2015-02-15 18:42:47 +05:30
Manish Goregaokar
bc1900f0d0 Rollup merge of #22300 - kmcallister:pub-method-macro, r=sfackler
Fixes #17436.
2015-02-15 18:42:47 +05:30
Manish Goregaokar
f7870b6faa Rollup merge of #22339 - petrochenkov:int, r=huonw
Some function signatures have changed, so this is a [breaking-change].
In particular, radixes and numerical values of digits are represented by `u32` now.

Part of #22240
2015-02-15 18:42:47 +05:30
Manish Goregaokar
8acaaa9e0e Rollup merge of #22351 - blaenk:path-hash, r=huonw
`PathBuf` does implement `Hash`, but `Path` doesn't. This makes it
annoying if you have a `HashMap` with `PathBuf`s as keys, because
it means you have to convert a `Path` into a `PathBuf` and get a
reference to it simply to perform operations on the `HashMap`!
2015-02-15 18:42:46 +05:30
Manish Goregaokar
c59f62b75f Rollup merge of #22350 - brson:usize, r=Gankro
cc https://github.com/rust-lang/rust/issues/22240
2015-02-15 18:42:46 +05:30
Manish Goregaokar
e5659eaa06 Rollup merge of #22347 - iKevinY:std-lib-panicking, r=brson
Rename `libstd/failure.rs` to `libstd/panicking.rs` and `on_fail` to `on_panic`. Closes #22306.
2015-02-15 18:42:46 +05:30
Manish Goregaokar
a5bdb087d0 Rollup merge of #22329 - thiagooak:book, r=steveklabnik
on crates and modules - replace \")\"
on more strings - improve readability of grapheme
2015-02-15 18:42:46 +05:30
Manish Goregaokar
c6ced0fb36 Rollup merge of #22328 - shepmaster:os_str_typo, r=steveklabnik 2015-02-15 18:42:46 +05:30
Manish Goregaokar
a0019989fe Rollup merge of #22324 - Manishearth:patch-1, r=steveklabnik
(fixes #22317)

rollupable
2015-02-15 18:42:45 +05:30
Manish Goregaokar
6ce265ede7 Rollup merge of #22308 - steveklabnik:gh19278, r=brson
Fixes #19278
2015-02-15 18:42:45 +05:30
Manish Goregaokar
cb0900193b Rollup merge of #22307 - steveklabnik:gh14849, r=huonw
Fixes #14849
2015-02-15 18:42:45 +05:30
Manish Goregaokar
70647ec7c5 Rollup merge of #22305 - steveklabnik:gh20948, r=alexcrichton
Fixes #20948
2015-02-15 18:42:45 +05:30
Manish Goregaokar
1da4e53330 Rollup merge of #22302 - japaric:gh21909, r=brson
closes #21909
2015-02-15 18:42:45 +05:30
Manish Goregaokar
1b86ebe257 Rollup merge of #22299 - bluss:range-64-is-not-exact-size, r=alexcrichton
Fixes #22047

`Range<u64>` and `Range<i64>` may be longer than usize::MAX on 32-bit
platforms, and thus they cannot fulfill the protocol for
ExactSizeIterator. We don't want a nonobvious platform dependency in
basic iterator traits, so the trait impl is removed.

The logic of this change assumes that usize is at least 32-bit.

This is technically a breaking change; note that `Range<usize>` and
`Range<isize>` are always ExactSizeIterators.

[breaking-change]
2015-02-15 18:42:44 +05:30
Manish Goregaokar
0f66e314db Rollup merge of #22295 - steveklabnik:gh9980, r=alexcrichton
Fixes #9980
2015-02-15 18:42:44 +05:30
Manish Goregaokar
db4a1678d7 Rollup merge of #22288 - steveklabnik:add_option_link, r=nikomatsakis 2015-02-15 18:42:44 +05:30
Manish Goregaokar
1718e6b19e Rollup merge of #22284 - steveklabnik:fix_another_lie, r=nikomatsakis
This isn't something we want to guarantee.

r? @nikomatsakis
2015-02-15 18:42:44 +05:30
Manish Goregaokar
1ee09f918d Rollup merge of #22280 - Unode:patch-1, r=steveklabnik 2015-02-15 18:42:44 +05:30
Manish Goregaokar
a2840f3560 Rollup merge of #22278 - nikomatsakis:rustc-error, r=nikomatsakis
Add `#[rustc_error]` annotation, which causes trans to signal an error
if found on the `main()` function. This lets you write tests that live
in `compile-fail` but are expected to compile successfully. This is
handy when you have many small variations on a theme that you want to
keep together, and you are just testing the type checker, not the
runtime semantics.

r? @pnkfelix
2015-02-15 18:42:43 +05:30
Manish Goregaokar
2935d67e08 Rollup merge of #22277 - pnkfelix:reference-update-feature-gate-list, r=steveklabnik
Added all active features to the list in reference.md.

Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it.  :)

Ensured that the feature gate list in reference.md is kept in alphabetical order.
2015-02-15 18:42:43 +05:30
Manish Goregaokar
f96fb8ecb8 Rollup merge of #22275 - steveklabnik:gh7538, r=huonw
We use them in some places, but never actually talk about the syntax.
2015-02-15 18:28:36 +05:30
Manish Goregaokar
33371bfc41 Rollup merge of #22274 - pnkfelix:retag-slicing-syntax-as-accepted, r=nikomatsakis
Re-tag `slicing_syntax` as `Accepted`.

Rollup merge (373cbab5b0) of PR #20723
accidentally reverted a portion of commit
8327bcc167 which shifted
`slicing_syntax` from Active to Accepted.
2015-02-15 18:28:14 +05:30
Manish Goregaokar
828a8644c7 Rollup merge of #22272 - steveklabnik:gh22064, r=alexcrichton
Fixes #22064.
2015-02-15 18:27:47 +05:30
Manish Goregaokar
ed9ffced22 Rollup merge of #22271 - steveklabnik:gh22035, r=nikomatsakis
Fixes #22035. (mostly by making it irrelevant)
2015-02-15 18:27:33 +05:30