Commit Graph

54245 Commits

Author SHA1 Message Date
Srinivas Reddy Thatiparthy
99e9f2ddc1 remove redundant test case 2016-06-11 20:59:58 +05:30
Srinivas Reddy Thatiparthy
028073dd60 run rustfmt on cargotest folder in src/tools/cargotest 2016-06-11 19:05:31 +05:30
Srinivas Reddy Thatiparthy
c9c2a034a3 run rustfmt on linkchecker folderin src/tools/linkchecker 2016-06-11 19:04:28 +05:30
bors
7d8e6dd3bf Auto merge of #34211 - srinivasreddy:rf_libstd_coll, r=brson
run rustfmt on libstd/collections/hash folder
2016-06-11 04:23:49 -07:00
Nick Cameron
c28374ef0b save-analysis: some refinements to JSON data
Split variable and function kinds to give more information. Give children for methods, structs, enums, and traits.
2016-06-11 12:23:57 +02:00
bors
682abf79af Auto merge of #34208 - shepmaster:llvm-3.7-linking-intrinsics, r=alexcrichton
Remove linking and intrinsics code made dead by only supporting LLVM 3.7 and up

This is mostly based on Alex's throwaway comment:

> probably reject those that LLVM just doesn't support...

So I'm more than happy to adjust the PR based on how you thought this should look. Also happy to split it into two PRs, one for linking and one for intrinsics.

r? @alexcrichton

/cc @nagisa @brson
2016-06-11 01:32:44 -07:00
bors
945ba12362 Auto merge of #34002 - jseyfried:strip_tests_in_cfg, r=nrc
Treat `#[test]` like `#[cfg(test)]` in non-test builds

This PR treats `#[test]` like `#[cfg(test)]` in non-test builds. In particular, like `#[cfg(test)]`,
 - `#[test]` nodes are stripped during `cfg` processing, and
 - `#[test]` is disallowed on non-optional expressions.

Closes #33946.
r? @nrc
2016-06-10 22:41:24 -07:00
Jeffrey Seyfried
65d256e82a Support nested cfg_attr attributes 2016-06-11 04:59:36 +00:00
Jeffrey Seyfried
29c4b6726a Refactor away the CfgFolder trait. 2016-06-11 03:13:48 +00:00
Jeffrey Seyfried
c89846c271 Forbid #[test] attributes on non-optional expressions. 2016-06-11 03:13:47 +00:00
Jeffrey Seyfried
66b9ade341 Strip #[test] nodes during cfg processing on non-test builds. 2016-06-11 03:13:44 +00:00
bors
f80ff7da39 Auto merge of #34174 - shepmaster:16-bit-mir, r=Aatch
Support 16-bit pointers in MIR
2016-06-10 19:50:42 -07:00
bors
0554abac63 Auto merge of #34172 - jseyfried:avoid_configuring_interpolated_ast, r=alexcrichton
Fix ICE regression caused by configuring interpolated AST

Fixes #34171.
r? @nrc
2016-06-10 16:55:30 -07:00
Srinivas Reddy Thatiparthy
bb19d1dc2e run rustfmt on libstd/collections/hash folder 2016-06-11 05:12:14 +05:30
Jake Goulding
448e254ca0 All intrinsics are available in all supported LLVM versions 2016-06-10 18:26:44 -04:00
Jake Goulding
3f36f7a980 Remove linking with AR
Since we only support LLVM 3.7 and above, we will never need to use the
AR linker. Remove the possibility of calling it and all the now-dead
code.
2016-06-10 18:26:42 -04:00
Andrew Paseltiner
9bf5daca90
Update tracking issue for {BTreeMap, BTreeSet}::{append, split_off} 2016-06-10 17:25:49 -04:00
Vadim Petrochenkov
f59afbc214 Remove last traces of identifier hygiene from HIR 2016-06-11 00:12:39 +03:00
bors
8c6bd23aaa Auto merge of #34199 - jseyfried:visit_all_attrs, r=nrc
Visit statement and expression attributes in the AST visitor

Currently, these attributes are not visited, so they are not gated feature checked in the post expansion visitor. This only affects crates using `#![feature(stmt_expr_attributes)]`.
r? @nrc
2016-06-10 10:37:35 -07:00
Jake Goulding
1858cfb80d Allow truncating constants to 16-bit u/isize 2016-06-10 13:07:04 -04:00
bors
a267d6cee4 Auto merge of #34200 - sanxiyn:rollup, r=sanxiyn
Rollup of 12 pull requests

- Successful merges: #34088, #34129, #34136, #34145, #34146, #34148, #34159, #34160, #34165, #34175, #34184, #34185
- Failed merges:
2016-06-10 07:43:52 -07:00
Seo Sanghyeon
fa5fb25e04 Check error index in make check 2016-06-10 22:06:40 +09:00
Seo Sanghyeon
107d423f1a Rollup merge of #34185 - tshepang:shorten-paragraph, r=steveklabnik
doc: intro should be 1 sentence

Also, do not repeat name of type
2016-06-10 21:16:46 +09:00
Seo Sanghyeon
633b2597cc Rollup merge of #34184 - euclio:patch-1, r=steveklabnik
fix indentation in README
2016-06-10 21:16:46 +09:00
Seo Sanghyeon
e58c967c86 Rollup merge of #34175 - rwz:patch-2, r=alexcrichton
Fix BTreeMap example typo

The whole example is made around movies reviews, but that one line says "review some books".
2016-06-10 21:16:46 +09:00
Seo Sanghyeon
71b05c2608 Rollup merge of #34165 - ollie27:docs_char_case, r=steveklabnik
docs: Improve char::to_{lower,upper}case examples

Collect the results to a String to make it clear that it will not always
return only one char and add examples showing that.

r? @steveklabnik
2016-06-10 21:16:46 +09:00
Seo Sanghyeon
886df542e2 Rollup merge of #34160 - hoodie:bug/GoT_References, r=GuillaumeGomez
Fixed two little Game Of Thrones References

Fixed: conflicting spelling of "Jon Snow"
Fixed: It's call "Night's Watch"
2016-06-10 21:16:45 +09:00
Seo Sanghyeon
e31210aac3 Rollup merge of #34159 - seventh-chord:master, r=alexcrichton
Updated README to account for changes in MSYS2

One of the newest versions of MSYS2 now only has one .cmd file which replaces the old bat files. It has to be used to launch the mingw32/64 shell.
2016-06-10 21:16:45 +09:00
Seo Sanghyeon
493f14903e Rollup merge of #34148 - srinivasreddy:bitflags_rustfmt, r=nagisa
run rustfmt on librustc_bitflags folder
2016-06-10 21:16:45 +09:00
Seo Sanghyeon
63bb68b861 Rollup merge of #34146 - srinivasreddy:libflate_rustfmt, r=nagisa
run rustfmt on libflate folder
2016-06-10 21:16:45 +09:00
Seo Sanghyeon
06e069ea16 Rollup merge of #34145 - matklad:any-docs, r=steveklabnik
docs: simplify wording

It took me more then a moment to decipher "with no non-`'static`" thing :)

"`'static` type" should say the same thing more clearly.

r? @steveklabnik
2016-06-10 21:16:45 +09:00
Seo Sanghyeon
b6940932d4 Rollup merge of #34136 - imjacobclark:ice-test-case-25579, r=nikomatsakis
Test case for borrowk ICE #25579

r? @nikomatsakis

Fixes #25579
2016-06-10 21:16:44 +09:00
Seo Sanghyeon
b2581974a3 Rollup merge of #34129 - jviide:from-string-box-error, r=steveklabnik
Remove a gotcha from book/error-handling.md

The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to
`Box<Error>`, so this gotcha and later references to it can now be removed.

r? @steveklabnik
2016-06-10 21:16:44 +09:00
Seo Sanghyeon
4f6e8f8259 Rollup merge of #34088 - srinivasreddy:rustfmt_map.rs, r=nrc
run rustfmt on map.rs in libcollections/btree folder
2016-06-10 21:16:44 +09:00
bors
68241f00ad Auto merge of #34178 - shepmaster:llvm-3.7-and-up, r=alexcrichton
Reflect supporting only LLVM 3.7+ in the LLVM wrappers

Based on 12abddb06b, it appears we can drop support for these older LLVM versions. Hopefully, this will make it slightly easier to support the changes needed for LLVM 3.9.

r? @nagisa

/cc @brson
2016-06-10 04:50:46 -07:00
Jeffrey Seyfried
8475a4b0c6 Check that custom attributes are disallowed on statements and expressions 2016-06-10 10:38:14 +00:00
Jeffrey Seyfried
11b538840f Visit statement and expression attributes 2016-06-10 10:38:11 +00:00
bors
a9234c11e0 Auto merge of #34086 - srinivasreddy:rustfmt_liballoc_jemalloc, r=nagisa
run rustfmt on liballoc_jemalloc folder
2016-06-10 00:19:09 -07:00
bors
c09d546ee5 Auto merge of #34046 - Vtec234:fix-atomic-doc, r=steveklabnik
Fix wrong statement in compare_exchange doc

The documentation for `core::sync::atomic::AtomicSomething::compare_exchange` contains a wrong, or imprecise, statement about the return value. It goes:

The return value is a result indicating whether the new value was written and containing
the previous value. On success this value is guaranteed to be equal to `new`.

In the second sentence, `this value` is gramatically understood as referring to `return value` from the first sentence. Due to how CAS works, the returned value is always what was in the atomic variable _before_ the operation occurred, not what was written into it during the operation. Hence, the fixed doc should say:

The return value is a result indicating whether the new value was written and containing
the previous value. On success this value is guaranteed to be equal to `current`.

This version is confirmed by the runnable examples in variants of `AtomicSomething`, e.g.

    assert_eq!(some_bool.compare_exchange(true, false, Ordering::Acquire, Ordering::Relaxed),
    Ok(true));

where the returned value is `Ok(current)`. This PR fixes all occurrences of this bug I could find.

An alternative solution would be to modify the second sentence so that it refers to the value _written_ into the Atomic rather than what was there before, in which case it would be correct. Example alternative formulation:

On success the value written into the `bool`/`usize`/`whatever` is guaranteed to be equal to `new`.

r? @steveklabnik
2016-06-09 21:29:26 -07:00
bors
2798772b51 Auto merge of #34173 - srinivasreddy:rm_redundant, r=alexcrichton
remove redundant  assert statements
2016-06-09 18:38:46 -07:00
bors
7d2f75a953 Auto merge of #34095 - petrochenkov:pathir2, r=jseyfried
Improvements to pattern resolution + some refactoring

Continuation of https://github.com/rust-lang/rust/pull/33929
First commit is a careful rewrite of `resolve_pattern`, pattern path resolution and new binding creation logic is factored out in separate functions, some minor bugs are fixed. Also, `resolve_possibly_assoc_item` doesn't swallow modules now.
Later commits are refactorings, see the comment descriptions.

I intend to continue this work later with better support for `Def::Err` in patterns in post-resolve stages and cleanup of pattern resolution code in type checker.

Fixes https://github.com/rust-lang/rust/issues/32086
Fixes https://github.com/rust-lang/rust/issues/34047 ([breaking-change])
Fixes https://github.com/rust-lang/rust/issues/34074

cc @jseyfried
r? @eddyb
2016-06-09 15:48:37 -07:00
Vadim Petrochenkov
6d7b35bd98 Address review comments + fix rebase 2016-06-10 01:06:37 +03:00
Ariel Ben-Yehuda
e783a0a5e3 make all pattern bindings with the same name resolve to the first one
This simplifies the code considerably, removing one of the
last uses of hygienic matching out of resolution.
2016-06-10 01:06:37 +03:00
Vadim Petrochenkov
392b6e7c81 Add tests 2016-06-10 01:03:54 +03:00
Vadim Petrochenkov
ee4e55398b Introduce TyCtxt::expect_def/expect_resolution helpers and use them where possible 2016-06-10 01:03:54 +03:00
Vadim Petrochenkov
4c30f6405c Move the hack with fake partial resolution for <A>::B from typeck to resolve 2016-06-10 01:03:54 +03:00
Vadim Petrochenkov
91b9dabdeb resolve: Rewrite resolve_pattern 2016-06-10 01:03:54 +03:00
Tshepang Lekhonkhobe
3dfc8c1869 doc: intro should be 1 sentence
Also, do not repeat name of type
2016-06-09 23:23:09 +02:00
Jake Goulding
e51958ba72 Support getting the minimum 16-bit isize value 2016-06-09 17:02:20 -04:00
Andy Russell
300a5d7d71 fix indentation in README 2016-06-09 16:12:12 -04:00