Commit Graph

31731 Commits

Author SHA1 Message Date
bors
fb4201ff34 auto merge of #16579 : steveklabnik/rust/gh9099, r=pcwalton
Fixes #9099
2014-08-18 22:46:19 +00:00
nham
a4bbb5bab4 Fix underflow bug in core::str::Searcher::new for haystacks of length < 20 2014-08-18 17:51:51 -04:00
Steve Klabnik
c88feffde4 Make comment about small bias in %.
Fixes #16354.
2014-08-18 17:46:18 -04:00
Alexis Beingessner
dcccf824b1 Fixing bitvset is_disjoint, fixes #16587 2014-08-18 17:05:26 -04:00
bors
e8ad6a888e auto merge of #16578 : steveklabnik/rust/gh16239, r=pcwalton
Fies #16239.
2014-08-18 21:01:19 +00:00
Steve Klabnik
f8a9211740 Explain modulo in the guide.
Fixes #15954
2014-08-18 15:38:47 -04:00
Daniel Micay
96f5eba4f5 work around MinGW linker bug for ASLR on Windows
Closes #16514
2014-08-18 15:30:35 -04:00
Steve Klabnik
4a288bc4b7 Explain EOF behavior in File.eof().
Fies #16239.
2014-08-18 15:28:27 -04:00
bors
98ec85f19e auto merge of #16575 : pcwalton/rust/import-foo-as-bar, r=aturon
of `use bar as foo`.

Change all uses of `use foo = bar` to `use bar as foo`.

Implements RFC #47.

Closes #16461.

[breaking-change]

r? @aturon
2014-08-18 19:16:15 +00:00
Luqman Aden
b90e2d4bc7 Add test for passing/getting packed structs with ffi. 2014-08-18 14:46:47 -04:00
Luqman Aden
82fa4368ed librustc: Fix field offsets for packed structs. 2014-08-18 14:46:46 -04:00
Steve Klabnik
e7910322cc Manual: add information about //!
Fixes #16569
2014-08-18 14:26:25 -04:00
Alexis Beingessner
40c45169b7 Refactor BitV internals to not use macro, reduce duplication 2014-08-18 14:23:27 -04:00
Steve Klabnik
2f8044418e Remove innapropriate string mutability section.
Fixes #14948
2014-08-18 14:00:35 -04:00
Steve Klabnik
46f27c9d96 Improve text of Option.unwrap()
Fixes #9099
2014-08-18 13:47:13 -04:00
Steve Klabnik
c47dfbb16a Guide: ownership 2014-08-18 13:27:44 -04:00
bors
fcbf012ee6 auto merge of #16576 : steveklabnik/rust/static_analysis_gate, r=pcwalton
This has certain implications that are wrong.

Fixes #16299.
2014-08-18 17:26:07 +00:00
Steve Klabnik
88e62a96ce Remove 'static analysis'
This has certain implications that are wrong.

Fixes #16299.
2014-08-18 13:10:25 -04:00
Patrick Walton
67deb2e65e libsyntax: Remove the use foo = bar syntax from the language in favor
of `use bar as foo`.

Change all uses of `use foo = bar` to `use bar as foo`.

Implements RFC #47.

Closes #16461.

[breaking-change]
2014-08-18 09:19:10 -07:00
bors
7074592ee1 auto merge of #16571 : pcwalton/rust/register-snapshots, r=pcwalton 2014-08-18 13:41:05 +00:00
Patrick Walton
63016dc474 snapshots: Register new snapshots. 2014-08-18 06:35:42 -07:00
Ruud van Asseldonk
62b1fbe7de libtime: Implement Add and Sub for Timespec. 2014-08-18 13:12:56 +02:00
bors
1721e81298 auto merge of #16568 : jakub-/rust/needstest, r=pcwalton
Closes #8761.
Closes #16010.
Closes #13033.
Closes #15094.
2014-08-18 10:11:03 +00:00
bors
ed7a3d6f1e auto merge of #16556 : pczarn/rust/wbr, r=alexcrichton
Prevents zero-width spaces from appearing in copy-pasted paths.

Fixes #16555
2014-08-18 08:26:05 +00:00
bors
ef439ddce0 auto merge of #16450 : klutzy/rust/win-fixme-cleanup, r=alexcrichton
First commit enables regex test on Windows. It was not working at some point (#13725), but it works now.

Second commit removes various FIXMEs regarding #13793, since upstream bug has been fixed.
2014-08-18 06:01:08 +00:00
klutzy
480674694e Remove workaround of #13793/#10872
LLVM assertion error has been fixed recently:
http://llvm.org/bugs/show_bug.cgi?id=18993

Fixes #13793
2014-08-18 13:45:08 +09:00
klutzy
d7916f8d44 regex: Enable test on Windows
Fixes #13725
2014-08-18 13:44:29 +09:00
bors
1824973a13 auto merge of #16567 : jakub-/rust/issue-16149, r=pcwalton
Fixes #16149.
2014-08-18 04:16:12 +00:00
bors
3b65124063 auto merge of #16566 : thestinger/rust/aslr, r=pcwalton
This is enough for dynamic libraries, but not executables because MinGW
does not output a .reloc section even with `--dynamicbase`. It could
either be worked around by exporting a DLL symbol from the executable or
fixed in MinGW itself.
2014-08-18 02:31:11 +00:00
bors
01ec6fab21 auto merge of #16559 : Gankro/rust/bitv, r=pcwalton
These were the only differing-size-based errors I noticed. Might be more.
2014-08-18 00:46:10 +00:00
Jakub Wieczorek
5b9cd453c9 Add missing tests for fixed issues
Closes #8761.
Closes #16010.
Closes #13033.
Closes #15094.
2014-08-18 01:47:28 +02:00
bors
0d8738f9b5 auto merge of #16565 : kaseyc/rust/documentation_fixes, r=pcwalton
Corrected the sample rustdoc command to use --output instead of --output-dir and fixed markdown formatting in debuginfo.rs.
2014-08-17 23:01:10 +00:00
Alexis Beingessner
8c9bdda89b Correct internal BitvSet 0-padding, fixes #16542 2014-08-17 18:49:10 -04:00
Jakub Wieczorek
d283574558 Forbid extern statics from appearing in patterns
Fixes #16149.
2014-08-18 00:08:57 +02:00
Daniel Micay
54cb0f6368 mark Windows binaries as compatible with ASLR
This is enough for dynamic libraries, but not executables because MinGW
does not output a .reloc section even with `--dynamicbase`. It could
either be worked around by exporting a DLL symbol from the executable or
fixed in MinGW itself.
2014-08-17 17:17:20 -04:00
bors
776c17f476 auto merge of #16554 : jakub-/rust/struct-pat-fields-ty-err, r=pcwalton
Fixes #16338.
Fixed #16401.
2014-08-17 21:16:10 +00:00
Kasey Carrothers
61b9036bb8 Changed the sample command in the Rustdoc readme to use --output instead of the outdated --output-dir and
fixed markdown formatting in debuginfo.rs
2014-08-17 14:01:26 -07:00
Jakub Wieczorek
9b0f89d342 Fix type checking of struct fields in patterns of type ty_err
Fixes #16338.
Fixed #16401.
2014-08-17 21:34:01 +02:00
bors
3f57c8988d auto merge of #16558 : Gankro/rust/hashbig, r=pcwalton
Pretty self-explanatory. Only annoying thing is that it *seems* that I had to add `#![feature(default_type_params)]` to libnum because of Hasher. Don't know if there's a way around that.

Fix #16551
2014-08-17 19:31:10 +00:00
Piotr Czarnecki
958250c0e5 rustdoc: Fix and improve line break hints with the <wbr> tag
Prevents zero-width spaces from appearing in copy-pasted paths.

Puts line breaks after `::`.

Fixes #16555
2014-08-17 19:28:20 +01:00
bors
fb018a3d4b auto merge of #16550 : kaseyc/rust/fix_documentation_error, r=alexcrichton 2014-08-17 16:41:11 +00:00
Alexis Beingessner
af82adce75 Make BigUint and BigInt Hash, fixes #16551 2014-08-17 12:26:33 -04:00
bors
dc65307e3b auto merge of #16547 : huonw/rust/new-kw, r=pcwalton 2014-08-17 14:56:08 +00:00
bors
eff87bc9d2 auto merge of #16543 : huonw/rust/deprecated-btree, r=alexcrichton
This is very half-baked at the moment and very inefficient, e.g.
inappropriate use of by-value `self` (and thus being forced into an
overuse of `clone`). People get the wrong impression about Rust when
using it, e.g. that Rust cannot express what other languages can because
the implementation is inefficient: https://news.ycombinator.com/item?id=8187831 .
2014-08-17 13:11:06 +00:00
bors
a12a4ddcfa auto merge of #16537 : jakub-/rust/use-mod-manual, r=alexcrichton 2014-08-17 10:46:08 +00:00
bors
921240e00a auto merge of #16432 : pcwalton/rust/kindck-traits, r=nikomatsakis
them during kind checking.

This implements RFC #11.

Closes #15759.

r? @nikomatsakis
2014-08-17 08:46:09 +00:00
Patrick Walton
086a5ca7d2 librustc: Allow trait bounds on structures and enumerations, and check
them during kind checking.

This implements RFC #11.

Closes #15759.
2014-08-17 01:39:10 -07:00
bors
6dca1426bc auto merge of #16535 : michaelsproul/rust/vim-traits, r=pcwalton
The vim syntax highlighting file had become out of sync with the real prelude.

Lots of Vector -> Slice renames have happened recently.
2014-08-17 06:26:09 +00:00
bors
cb9c1e0e70 auto merge of #16498 : Kimundi/rust/inline-utf-encoding, r=alexcrichton
The first commit improves code generation through a few changes:
- The `#[inline]` attributes allow llvm to constant fold the encoding step away in certain situations. For example, code like this changes from a call to `encode_utf8` in a inner loop to the pushing of a byte constant:

 ```rust
let mut s = String::new();
for _ in range(0u, 21) {
        s.push_char('a');
}
```
- Both methods changed their semantic from causing run time failure if the target buffer is not large enough to returning `None` instead. This makes llvm no longer emit code for causing failure for these methods.
- A few debug `assert!()` calls got removed because they affected code generation due to unwinding, and where basically unnecessary with today's sound handling of `char` as a Unicode scalar value.

~~The second commit is optional. It changes the methods from regular indexing with the `dst[i]` syntax to unsafe indexing with `dst.unsafe_mut_ref(i)`. This does not change code generation directly - in both cases llvm is smart enough to see that there can never be an out-of-bounds access. But it makes it emit a `nounwind` attribute for the function. 
However, I'm not sure whether that is a real improvement, so if there is any objection to this I'll remove the commit.~~

This changes how the methods behave on a too small buffer, so this is a 

[breaking-change]
2014-08-17 04:42:32 +00:00
Kasey Carrothers
9e514af07e Fix an error in a code sample in bitv.rs 2014-08-16 20:28:20 -07:00