Commit Graph

47192 Commits

Author SHA1 Message Date
William Throwe
1e0c23d781 Allow multi-digit GDB minor version numbers
GDB 7.10 was recently released.
2015-09-24 13:04:22 -04:00
Simon Sapin
081278eb7a Utf8Error::valid_up_to: make documented semantics more precise/useful 2015-09-24 18:54:12 +02:00
Alex Crichton
81f0bf7667 std: Switch string::ParseError to an empty enum
It can never be instantiated, so signify this by having it actually be an empty
`enum`.

cc #27734
2015-09-24 09:40:50 -07:00
Steve Klabnik
c3ca182082 Rollup merge of #28622 - tshepang:known-as-structs, r=steveklabnik 2015-09-24 10:26:37 -06:00
Steve Klabnik
e314ac601a Rollup merge of #28620 - tshepang:not-filled, r=steveklabnik 2015-09-24 10:26:37 -06:00
Steve Klabnik
c104ba3755 Rollup merge of #28619 - tshepang:fix-link, r=steveklabnik 2015-09-24 10:26:37 -06:00
Steve Klabnik
668ffb1dd8 Rollup merge of #28618 - tshepang:repetition, r=steveklabnik 2015-09-24 10:26:36 -06:00
Steve Klabnik
c16b0f7060 Rollup merge of #28617 - tshepang:optional, r=steveklabnik 2015-09-24 10:26:36 -06:00
Steve Klabnik
6f0a095d05 Rollup merge of #28616 - tshepang:idiom, r=steveklabnik 2015-09-24 10:26:36 -06:00
Ariel Ben-Yehuda
77e8f33c3d early-prohibit objects with Self-containing supertraits
Fixes #28576
2015-09-24 18:27:29 +03:00
Eduard Burtescu
f293ea28b4 Remove the deprecated box(PLACE) syntax. 2015-09-24 18:00:08 +03:00
bors
355bbfb895 Auto merge of #28602 - apasel422:clone_from, r=bluss
r? @bluss
2015-09-24 14:19:20 +00:00
Ariel Ben-Yehuda
6b1149d5ec use the infcx tables to check if a closure is Copy
Fixes #28550
2015-09-24 17:02:07 +03:00
Andrew Paseltiner
97f2a32564 Optimize Vec::clone_from
Before:

test dst_bigger::src_100_dst_1000::clone      ... bench:  34 ns/iter (+/- 1)
test dst_bigger::src_100_dst_1000::clone_from ... bench:  75 ns/iter (+/- 3)

test dst_bigger::src_10_dst_100::clone        ... bench:  25 ns/iter (+/- 0)
test dst_bigger::src_10_dst_100::clone_from   ... bench:   9 ns/iter (+/- 1)

test eq::src_1000_dst_1000::clone             ... bench: 105 ns/iter (+/- 2)
test eq::src_1000_dst_1000::clone_from        ... bench: 593 ns/iter (+/- 21)

test eq::src_100_dst_100::clone               ... bench:  34 ns/iter (+/- 1)
test eq::src_100_dst_100::clone_from          ... bench:  75 ns/iter (+/- 1)

test src_bigger::src_1000_dst_100::clone      ... bench: 103 ns/iter (+/- 5)
test src_bigger::src_1000_dst_100::clone_from ... bench: 148 ns/iter (+/- 5)

test src_bigger::src_100_dst_10::clone        ... bench:  34 ns/iter (+/- 1)
test src_bigger::src_100_dst_10::clone_from   ... bench:  20 ns/iter (+/- 0)

After:

test dst_bigger::src_100_dst_1000::clone      ... bench:  34 ns/iter (+/- 2)
test dst_bigger::src_100_dst_1000::clone_from ... bench:  15 ns/iter (+/- 1)

test dst_bigger::src_10_dst_100::clone        ... bench:  26 ns/iter (+/- 1)
test dst_bigger::src_10_dst_100::clone_from   ... bench:   7 ns/iter (+/- 0)

test eq::src_1000_dst_1000::clone             ... bench: 103 ns/iter (+/- 1)
test eq::src_1000_dst_1000::clone_from        ... bench:  85 ns/iter (+/- 4)

test eq::src_100_dst_100::clone               ... bench:  34 ns/iter (+/- 2)
test eq::src_100_dst_100::clone_from          ... bench:  15 ns/iter (+/- 1)

test src_bigger::src_1000_dst_100::clone      ... bench: 103 ns/iter (+/- 4)
test src_bigger::src_1000_dst_100::clone_from ... bench:  90 ns/iter (+/- 2)

test src_bigger::src_100_dst_10::clone        ... bench:  34 ns/iter (+/- 2)
test src_bigger::src_100_dst_10::clone_from   ... bench:  20 ns/iter (+/- 0)

Closes #28601.
2015-09-24 08:47:33 -04:00
Andre Bogus
12d990d385 the same technique applies to fasta-redux 2015-09-24 13:25:50 +02:00
Andre Bogus
960e85c8ea change fasta benchmark to Veedrac's implementation 2015-09-24 11:29:15 +02:00
Tshepang Lekhonkhobe
0b13ee0ced reference: rename "structure" to the more familiar "struct" 2015-09-24 08:42:39 +02:00
Steven Fackler
e5ee13f139 Add accessors for Formatter flags
cc #27726
2015-09-23 23:35:12 -07:00
Tshepang Lekhonkhobe
f34eafdcf9 reference: follow idiom in code snippet 2015-09-24 08:25:43 +02:00
Tshepang Lekhonkhobe
996bd9d0d6 reference: 3 of the 4 things mentioned here are optional 2015-09-24 08:22:58 +02:00
Tshepang Lekhonkhobe
7077075372 doc: "familiarity" does not need to be repeated here 2015-09-24 08:04:55 +02:00
Tshepang Lekhonkhobe
e0f35da9c1 reference: fix anchor link 2015-09-24 07:55:59 +02:00
Tshepang Lekhonkhobe
5f73037b8a reference: not sure this is the right place to discuss design 2015-09-24 07:50:44 +02:00
Tshepang Lekhonkhobe
16244b884d reference: make that less awkward to read 2015-09-24 07:43:37 +02:00
Tshepang Lekhonkhobe
64cc19d520 reference: "ffi" is normally in upper case 2015-09-24 07:27:16 +02:00
bors
8fe79bdfda Auto merge of #28607 - remram44:doc-fix-str-pattern, r=alexcrichton
Reported by Moonlightning on #rust
> 17:13 EDT < Moonlightning> I think I found a bug in the str::matches() documentation. Was it copied from str::split()? :p
> 17:13 EDT < Moonlightning> Because it says “The pattern can be a simple `&str`, `char`, or a closure that determines the split.”

I changed "determines the split" to "determines if a character matches".

It's not super clear, "determines the split" is not super clear to begin with, maybe this can be made better? On the other hand following the link to Pattern provides enough details.
2015-09-24 02:39:02 +00:00
bors
f0666b45dd Auto merge of #28598 - semarie:openbsd-unbreak, r=alexcrichton
separate use code between openbsd/netbsd

netbsd use c_int and c_uint, but openbsd not, resulting a unused_import
error.

r? @alexcrichton 

problem introduced by #28543
2015-09-24 00:02:07 +00:00
Sebastian Wicki
af68cdfea1 rustc: Add target_vendor for target triples
This adds a new target property, `target_vendor` which can be used as a
matcher for conditional compilation. The vendor is part of the autoconf
target triple: <arch><sub>-<vendor>-<os>-<env>

The default value for `target_vendor` is "unknown".

Matching against the `target_vendor` with `#[cfg]` is currently feature
gated as `cfg_target_vendor`.
2015-09-24 01:44:55 +02:00
Nick Cameron
459f7720b9 Better function calls 2015-09-24 11:32:01 +12:00
Nick Cameron
06812c2999 manual fixups 2015-09-24 10:57:28 +12:00
Nick Cameron
8f51c8d687 rustfmt liballoc 2015-09-24 10:00:54 +12:00
bors
4f15e465e5 Auto merge of #28596 - sanxiyn:dedup-unused, r=alexcrichton
Fix #22599.
2015-09-23 21:41:09 +00:00
bors
afae2ff723 Auto merge of #28569 - semarie:stdcpp-tests, r=alexcrichton
extend the search path of libraries to /usr/local/lib in `run-make`
testsuite. It should permit to find libstdc++.so on usual directory.

r? @alexcrichton
2015-09-23 18:55:01 +00:00
Remi Rampin
30fbf44fbc Fix bad copypasta for patterns doc in std::str 2015-09-23 14:35:53 -04:00
Vadim Petrochenkov
40ce80484c Remove random Idents outside of libsyntax 2015-09-23 20:04:49 +03:00
bors
edeb4f1c86 Auto merge of #28603 - steveklabnik:small_config_fix, r=alexcrichton
We don't actually probe for javac in all circumstances, so if you have
javac installed, but don't have antlr4 installed, and you're on Mac OS
X, then you'll get a message that javac is missing, even though that's
wrong.

To fix this, let's just be a bit more generic in the message, so that
it's the same no matter what part of the lexer tests you're missing.

cc
https://www.reddit.com/r/rust/comments/3m199d/running_make_check_on_the_source_code_says_javac/
2015-09-23 16:07:04 +00:00
Steve Klabnik
f78115434c Make lexer tooling message more generic
We don't actually probe for javac in all circumstances, so if you have
javac installed, but don't have antlr4 installed, and you're on Mac OS
X, then you'll get a message that javac is missing, even though that's
wrong.

To fix this, let's just be a bit more generic in the message, so that
it's the same no matter what part of the lexer tests you're missing.

cc
https://www.reddit.com/r/rust/comments/3m199d/running_make_check_on_the_source_code_says_javac/
2015-09-23 11:43:49 -04:00
Amit Aryeh Levy
b30d8969e8 Explain in comment why FixedSizeArray is unsafe 2015-09-23 11:38:01 -04:00
Andrew Paseltiner
e9946f99b9 Override clone_from for {BinaryHeap, String}
CC #28481
2015-09-23 10:32:58 -04:00
Sébastien Marie
3b42b60bf6 unbreak openbsd after netbsd integration
separate use code between openbsd/netbsd.

netbsd use c_int and c_uint, but openbsd not, resulting a unused_import
error.
2015-09-23 09:39:50 +02:00
bors
07ca1ab1ec Auto merge of #28585 - ranma42:simpler-panic, r=alexcrichton
This is part of some cleanup I did while investigating #28129.
This also ensures that `on_panic` is run even if the user has registered too many callbacks.
2015-09-23 03:56:27 +00:00
Seo Sanghyeon
54792febe0 Do not traverse RHS of assignment twice for unused variables lint
walk_expr includes call to visit_expr for subexpressions.
2015-09-23 11:52:37 +09:00
bors
cefe5f25b2 Auto merge of #28580 - wesleywiser:split_out_type_lints, r=alexcrichton
Move out the `TypeLimits` and `ImproperCTypes` lints into a separate module. 

Part of #22206
2015-09-23 02:11:18 +00:00
bors
b2f379cdc2 Auto merge of #28535 - petrochenkov:name, r=nrc
Part of https://github.com/rust-lang/rust/issues/6993

This patch replaces `Ident`s with `Name`s in data structures of HIR and updates the dependent crates to compile and pass `make check`.
Some HIR structures still use `Ident`s, namely `PathSegment`, `PatIdent`, `ExprWhile`, `ExprLoop`, `ExprBreak` and `ExprAgain`,  they need them for resolve (but `PathSegment` is special, see https://github.com/rust-lang/rust/issues/6993#issuecomment-141256292).

r? @nrc
2015-09-23 00:25:42 +00:00
bors
ad82e0ac18 Auto merge of #28504 - Eljay:fix-trait-privacy, r=nrc
Fixes #16264 / #18241.

As far as I can tell, it should be impossible for a trait to be inaccessible if it's in scope, so this check is unnecessary. Are there any cases where this check is actually needed?
2015-09-22 22:42:00 +00:00
bors
ecbd8c3b43 Auto merge of #28369 - ebfull:fix-higher-ranked, r=nikomatsakis
Fixes #28279.

Currently

`common_supertype(*mut for<'a> Fn(&'a usize), *mut for<'a> Fn(&'a usize) + 'static)`

equals `*mut Fn(&usize)` which seems to be caused by `higher_ranked_sub()` allowing region variables to escape the comparison. This prevents inference from working properly with stuff like `Rc<Fn(&T)>`.

r? @nikomatsakis
2015-09-22 20:57:43 +00:00
bors
9c1aaeb7b9 Auto merge of #28543 - gandro:netbsd, r=alexcrichton
These changes introduce the ability to cross-compile working binaries for NetBSD/amd64. Previous support added in PR #26682 shared all its code with the OpenBSD implementation, and was therefore never functional (e.g. linking against non-existing symbols and using wrong type definitions). Nonetheless, the previous patches were a great starting point and made my work significantly easier. 😃 

Because there are no stage0 snapshots for NetBSD (yet), I used a cross-compiler for NetBSD 7.0 RC3 and only tested some toy programs (threading and channels, stack guards, a small TCP/IP echo server and some other platform dependent bits). If someone could point me to documentation on how to generate a stage0 snapshot from a cross-compiler I'm happy to run the full test suite.

A few other notes regarding Rust on NetBSD/amd64:
- To preserve binary compatibility, NetBSD introduces new symbols for system call wrappers on breaking ABI changes and keeps the old (legacy) symbols around, see [this documentation](https://www.netbsd.org/docs/internals/en/chap-processes.html#syscalls_master) for some details. I went ahead and modified the `libc` and `std` crate to use the current (renamed) symbols instead of the legacy ones where I found them, but I might have missed some. Notably using the `sigaction` symbol (deprecated in 1998) instead of `__sigaction14` even triggers SIGSYS (bad syscall) on my amd64 setup. I also changed the type definitions to use the most recent version.
- NetBSD's gdb doesn't really support position independent executables, so you might want to turn that off for debugging, see [NetBSD Problem Report #48250](https://gnats.netbsd.org/48250).
- For binaries invoked using a relative path, NetBSD supports `$ORIGIN` only for short `rpath`s (~64 chars or so, I'm told). If running an executable fails with `execname not specified in AUX vector: No such file or directory`, consider invoking the binary using its full absolute path.
2015-09-22 19:13:39 +00:00
Vadim Petrochenkov
0af8e47546 Fix rebase 2015-09-22 20:46:23 +03:00
Andrea Canciani
c6d277ade6 Remove unwind::register
The `register` function is unstable and it is not used anymore, hence
it can be removed (together with the now-unused `Callback` type and
`static` variables).
2015-09-22 19:00:20 +02:00
Vadim Petrochenkov
45b445e5a3 Restore fold_ident and visit_ident 2015-09-22 19:58:30 +03:00