David Voit
e36e97ba51
rustc_trans: 'assume' intrinsic is only available on LLVM >= 3.6
...
Based on the patch from Luca Bruno.
Instead of creating an empty C function in the rt, this version creates an shim
noop function using llvm. This function is declared as internal, and the
unsupported assume intrinsic and the shim gets completly removed by the
optimizer.
2015-06-07 22:47:01 -04:00
Luca Bruno
ce32f6412e
rustc_trans: don't hardcode llvm version for conditional intrinsics
...
This commit introduce a third parameter for compatible_ifn!, as new
intrinsics are being added in recent LLVM releases and there is no
need to hardcode a specific case.
Signed-off-by: Luca Bruno <lucab@debian.org>
2015-06-07 22:47:00 -04:00
Tamir Duberstein
1be9e6f055
Remove useless const
2015-06-07 22:43:21 -04:00
bors
dcc59c09a9
Auto merge of #26087 - fitzgen:improve-suggestion-hueristics, r=Aatch
...
This makes the maximum edit distance of typo suggestions a function of the typo'd name's length. FWIW, clang uses this same hueristic, and I've found their suggestions to be better than rustc's. Without something like this, you end up with suggestions that aren't related at all when there are short variable names.
See also https://github.com/rust-lang/rust/issues/20028#issuecomment-109767159
2015-06-08 01:48:59 +00:00
Nick Fitzgerald
93d01eb443
Make the maximum edit distance of typo suggestions a function of the typo'd name's length.
2015-06-07 18:01:33 -07:00
Nick Cameron
8d9a58131d
error due to rebase
2015-06-08 12:18:42 +12:00
Nick Cameron
83c73e327a
review changes - only show closure ids in verbose mode
2015-06-08 11:41:48 +12:00
Nick Cameron
79b0c89d50
Don't visit items in removed branches
...
Note that they will be visited anyway by base::trans_item, this just duplicates the items.
2015-06-08 11:41:48 +12:00
Nick Cameron
e9db5fb202
Tidying up, fix some minor linkage bugs, use ty flags to avoid caching closure types.
2015-06-08 11:41:48 +12:00
Chris Hellmuth
2938d92a35
Add a regression test for public struct field spans
2015-06-07 17:29:09 -06:00
Chris Hellmuth
a72283832d
StructField span should include pub
2015-06-07 16:34:03 -06:00
diwic
33118eb17a
Make all leaks safe in language reference
...
Since it was determined that no leaks were unsafe, some of the documentation is still not clear about this. Here's one example.
2015-06-07 23:14:01 +02:00
bors
8f9f2fe97e
Auto merge of #25912 - tshepang:better-str-examples, r=bluss
2015-06-07 20:59:20 +00:00
Simon Sapin
2ff42435c2
Deprecate String::from_str in favor of String::from
...
With the latter is provided by the `From` conversion trait, the former is now completely redundant. Their code is identical.
2015-06-07 22:36:58 +02:00
bors
776f87ef9e
Auto merge of #26070 - brson:nightlyfix, r=alexcrichton
...
Broken on nightly linux distcheck.
2015-06-07 19:25:56 +00:00
Chuck Bassett
675b3decad
Update doctest in comments.md
...
For a user following the path of reading Chapter 5: Syntax & Symantics
prior to Chapter 4: Learn Rust, this will be the first time they have
encountered executable tests inside documentation comments.
The test will fail because the `add_one` function is not defined in
the context of the doctest. This might not be the optimal place to
introduce and explain the `/// #` notation but I think it is important
that this snippet pass as a test when `rustdoc --test` is run against
it if it is going to be shown.
2015-06-07 15:06:58 -04:00
Tshepang Lekhonkhobe
0335a94a68
doc: improve some of str examples
2015-06-07 20:58:47 +02:00
Brian Anderson
b26a48868c
test: Ignore gdb-pretty-struct-and-enums.rs
...
Broken on nightly linux distcheck.
2015-06-07 11:10:56 -07:00
Oliver 'ker' Schneider
ec078a033b
change some statics to constants
2015-06-07 19:50:13 +02:00
Simonas Kazlauskas
ab86face01
Don’t ICE if fs::canonicalise fails in meta-load
...
This might fail when --extern library is a symlink to an invalid location. Instead just pretend it
doesn’t exist at all.
2015-06-07 20:34:12 +03:00
bors
64d32b057e
Auto merge of #26066 - steveklabnik:docs_on_a_plane, r=alexcrichton
...
When things get stabilized, they don't always have their docs updated to remove the gate.
2015-06-07 17:04:40 +00:00
Eli Friedman
a1d2eb8b14
Clear cached landing pads before generating a call.
...
Using the wrong landing pad has obvious bad effects, like dropping a value
twice.
Testcase written by Alex Crichton.
Fixes #25089 .
2015-06-06 19:20:27 -07:00
bors
ae74652b4a
Auto merge of #26057 - audebert:master, r=alexcrichton
...
The constraint referenced here is:
```rust
fn foo<T>(t: T) where T: Trait<AssociatedType=u32> { /* */ }
```
2015-06-07 00:07:07 +00:00
Steve Klabnik
a3b19c8858
Remove many unneeded feature annotations in the docs
...
When things get stabilized, they don't always have their docs updated to remove the gate.
2015-06-06 18:58:35 -04:00
bors
72b03e5337
Auto merge of #26047 - chuckSMASH:patch-1, r=alexcrichton
...
The sensible default used here for the version number in the
auto-generated Cargo.toml is 0.1.0, not 0.0.1 (at least as of cargo
0.2.0-nightly efb482d
).
2015-06-06 21:33:43 +00:00
funkill
5f5a84a59c
fix path in toc links
2015-06-06 23:27:35 +03:00
bors
98f6e40b6e
Auto merge of #26050 - bluss:linked-list, r=Gankro
...
The recent bug that was found in LinkedList reminded me of some general cleanup
that's been waiting for some time.
- Use a loop from the front in Drop, it works just as well and without an unsafe block
- Change Rawlink methods to use `unsafe` in an idiomatic way. This does mean that
we need an unsafe block for each dereference of a raw link. Even then, the extent
of unsafe-critical code is even larger of course, since safety depends on the whole
data structure's integrity. This is a general problem we are aware of.
- Some cleanup just to try to decrease the amount of Rawlink handling.
2015-06-06 18:40:11 +00:00
Simon Sapin
7ac6b58237
Mark str::to_uppercase and str::to_lowercase as stable.
2015-06-06 20:37:23 +02:00
Ulrik Sverdrup
32037a5696
linked_list: Add Rawlink::from
2015-06-06 20:05:39 +02:00
Ulrik Sverdrup
16cefab795
linked_list: Add method Node::set_next
2015-06-06 20:05:39 +02:00
Ulrik Sverdrup
201852e56a
linked_list: Cleanup code in split_off
2015-06-06 20:05:38 +02:00
Rémi Audebert
27dd0dda1b
Fix small typo in diagnostics.rs
2015-06-06 18:32:49 +02:00
bors
bfd072db45
Auto merge of #26038 - eddyb:dst-nested, r=luqmana
...
Allows `Rc<RefCell<Trait>>` and other containers. Fixes #25351 .
r? @nrc This is the discussed strategy, more or less.
2015-06-06 15:32:26 +00:00
bors
d6b82428b5
Auto merge of #26045 - sourcefrog:patch-1, r=alexcrichton
...
File handles are inherited from, not by, the parent process
2015-06-06 12:28:50 +00:00
Ulrik Sverdrup
289d5db409
linked_list: Use unsafe properly for Rawlink methods
2015-06-06 14:26:39 +02:00
Ulrik Sverdrup
a090e1f411
linked_list: Use a safe loop in Drop
2015-06-06 14:26:39 +02:00
Simon Sapin
f901086b0d
Correctly map upper-case Sigma to lower-case in word-final position. Fix #26035 .
2015-06-06 12:37:11 +02:00
Simon Sapin
d316487ec1
Add char::to_titlecase
...
But not str::to_titlecase which would require UAX#29 Unicode Text Segmentation
which we decided not to include in of `std`:
https://github.com/rust-lang/rfcs/pull/1054
2015-06-06 12:37:11 +02:00
Simon Sapin
addaa5b1ff
Add complex (but unconditional) Unicode case mapping. Fix #25800
...
As a result, the iterator returned by `char::to_uppercase` sometimes
yields two or three `char`s instead of just one.
2015-06-06 12:37:10 +02:00
Simon Sapin
66af12721a
to_lowercase/to_uppercase: also map chars not in Lu/Ll categories.
...
This adds 120 mappings:
Dž dž
Dž DŽ
Lj lj
Lj LJ
Nj nj
Nj NJ
Dz dz
Dz DZ
Ι
ᾈ ᾀ
ᾉ ᾁ
ᾊ ᾂ
ᾋ ᾃ
ᾌ ᾄ
ᾍ ᾅ
ᾎ ᾆ
ᾏ ᾇ
ᾘ ᾐ
ᾙ ᾑ
ᾚ ᾒ
ᾛ ᾓ
ᾜ ᾔ
ᾝ ᾕ
ᾞ ᾖ
ᾟ ᾗ
ᾨ ᾠ
ᾩ ᾡ
ᾪ ᾢ
ᾫ ᾣ
ᾬ ᾤ
ᾭ ᾥ
ᾮ ᾦ
ᾯ ᾧ
ᾼ ᾳ
ῌ ῃ
ῼ ῳ
Ⅰ ⅰ
Ⅱ ⅱ
Ⅲ ⅲ
Ⅳ ⅳ
Ⅴ ⅴ
Ⅵ ⅵ
Ⅶ ⅶ
Ⅷ ⅷ
Ⅸ ⅸ
Ⅹ ⅹ
Ⅺ ⅺ
Ⅻ ⅻ
Ⅼ ⅼ
Ⅽ ⅽ
Ⅾ ⅾ
Ⅿ ⅿ
ⅰ Ⅰ
ⅱ Ⅱ
ⅲ Ⅲ
ⅳ Ⅳ
ⅴ Ⅴ
ⅵ Ⅵ
ⅶ Ⅶ
ⅷ Ⅷ
ⅸ Ⅸ
ⅹ Ⅹ
ⅺ Ⅺ
ⅻ Ⅻ
ⅼ Ⅼ
ⅽ Ⅽ
ⅾ Ⅾ
ⅿ Ⅿ
Ⓐ ⓐ
Ⓑ ⓑ
Ⓒ ⓒ
Ⓓ ⓓ
Ⓔ ⓔ
Ⓕ ⓕ
Ⓖ ⓖ
Ⓗ ⓗ
Ⓘ ⓘ
Ⓙ ⓙ
Ⓚ ⓚ
Ⓛ ⓛ
Ⓜ ⓜ
Ⓝ ⓝ
Ⓞ ⓞ
Ⓟ ⓟ
Ⓠ ⓠ
Ⓡ ⓡ
Ⓢ ⓢ
Ⓣ ⓣ
Ⓤ ⓤ
Ⓥ ⓥ
Ⓦ ⓦ
Ⓧ ⓧ
Ⓨ ⓨ
Ⓩ ⓩ
ⓐ Ⓐ
ⓑ Ⓑ
ⓒ Ⓒ
ⓓ Ⓓ
ⓔ Ⓔ
ⓕ Ⓕ
ⓖ Ⓖ
ⓗ Ⓗ
ⓘ Ⓘ
ⓙ Ⓙ
ⓚ Ⓚ
ⓛ Ⓛ
ⓜ Ⓜ
ⓝ Ⓝ
ⓞ Ⓞ
ⓟ Ⓟ
ⓠ Ⓠ
ⓡ Ⓡ
ⓢ Ⓢ
ⓣ Ⓣ
ⓤ Ⓤ
ⓥ Ⓥ
ⓦ Ⓦ
ⓧ Ⓧ
ⓨ Ⓨ
ⓩ Ⓩ
2015-06-06 12:37:10 +02:00
bors
c21fd9a34f
Auto merge of #26041 - Nashenas88:sync-send-libcore-char, r=alexcrichton
...
This is a test for #22709 .
2015-06-06 06:32:05 +00:00
Chuck Bassett
1826672c06
Updated Cargo.toml version number output
...
The sensible default used here for the version number in the
auto-generated Cargo.toml is 0.1.0, not 0.0.1 (at least as of cargo
0.2.0-nightly).
2015-06-05 23:33:30 -04:00
Jake Goulding
e20a6dbeed
Add methods for handing CStrings back and forth to C
2015-06-05 22:27:09 -04:00
Jake Goulding
97294be30c
Convert CString to a Box<[u8]>
2015-06-05 22:27:09 -04:00
Paul Faria
847d03e497
fixup! Added test for Sync/Send on iterators within char. Added todo blocks for other files in libcore implementing iterators.
2015-06-05 21:18:23 -04:00
Martin Pool
17d76b350b
Another small grammar fix for process.rs
2015-06-05 17:32:34 -07:00
Martin Pool
cd90854899
Doc fix for process.rs
...
File handles are inherited from, not by, the parent process
2015-06-05 17:27:04 -07:00
bors
0b0c89efb3
Auto merge of #26032 - achiwhane:master, r=steveklabnik
...
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.
2015-06-05 21:44:21 +00:00
Paul Faria
db2f9d2b6a
Added test for Sync/Send on iterators within char. Added todo blocks for other files in libcore implementing iterators.
2015-06-05 17:43:17 -04:00
bors
c78c0994b1
Auto merge of #26024 - Aatch:inline-as_bytes, r=Gankro
...
This wasn't marked inline, so wasn't being inlined cross-crate. It's
actually a no-op function, since it's a wrapper around `mem::transmute`.
Marking it inline means that programs calling it can see that it's a
no-op and act accordingly during optimisation.
2015-06-05 18:47:38 +00:00