]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorustc_trans: remove some outdated and unused logic from callee.
Eduard Burtescu [Thu, 2 Jul 2015 11:34:53 +0000 (14:34 +0300)]
rustc_trans: remove some outdated and unused logic from callee.

9 years agorustc_lint: use traits::select for methods in unconditional_recursion.
Eduard Burtescu [Thu, 2 Jul 2015 10:33:01 +0000 (13:33 +0300)]
rustc_lint: use traits::select for methods in unconditional_recursion.

9 years agorustc_trans: explicit impl population is unnecessary in fulfill_obligation.
Eduard Burtescu [Thu, 2 Jul 2015 06:11:36 +0000 (09:11 +0300)]
rustc_trans: explicit impl population is unnecessary in fulfill_obligation.

9 years agorustc: simplify ty::MethodOrigin and avoid trait item indices.
Eduard Burtescu [Thu, 2 Jul 2015 05:52:36 +0000 (08:52 +0300)]
rustc: simplify ty::MethodOrigin and avoid trait item indices.

9 years agorustc: remove unused MethodStaticClosure variant of MethodOrigin.
Eduard Burtescu [Tue, 30 Jun 2015 10:41:13 +0000 (13:41 +0300)]
rustc: remove unused MethodStaticClosure variant of MethodOrigin.

9 years agoAuto merge of #26370 - nikomatsakis:better-object-defaults-warn, r=nikomatsakis
bors [Sat, 4 Jul 2015 00:23:30 +0000 (00:23 +0000)]
Auto merge of #26370 - nikomatsakis:better-object-defaults-warn, r=nikomatsakis

This is an implementation of RFC rust-lang/rfcs#1156. It includes the code to implement the new rules, but that code is currently disabled. It also includes code to issue warnings when the change will cause breakage. These warnings try hard to be targeted but are also somewhat approximate. They could, with some effort, be made *more* targeted by adjusting the code in ty_relate that propagates the "will change" flag to consider the specific operation. Might be worth doing.

r? @pnkfelix (I think you understand region inference best)

9 years agoFix some merge conflicts
Niko Matsakis [Wed, 24 Jun 2015 14:17:31 +0000 (10:17 -0400)]
Fix some merge conflicts

9 years agoNow that I made the warning smarter, these tests no longer require modification
Niko Matsakis [Wed, 17 Jun 2015 18:11:58 +0000 (14:11 -0400)]
Now that I made the warning smarter, these tests no longer require modification

9 years agoAdjust tests to silence warnings (or record them, as appropriate).
Niko Matsakis [Wed, 17 Jun 2015 14:12:18 +0000 (10:12 -0400)]
Adjust tests to silence warnings (or record them, as appropriate).

9 years agoAfter inferring regions, scan for any bounds that are due to a lifetime
Niko Matsakis [Wed, 17 Jun 2015 14:08:26 +0000 (10:08 -0400)]
After inferring regions, scan for any bounds that are due to a lifetime
bound that is likely to change. In that case, it will change to 'static,
so then scan down the graph to see whether there are any hard
constraints that would prevent 'static from being a valid value
here. Report a warning.

9 years agoAdd a boolean flag to ExistentialBounds tracking whether the
Niko Matsakis [Wed, 17 Jun 2015 13:11:34 +0000 (09:11 -0400)]
Add a boolean flag to ExistentialBounds tracking whether the
region-bound is expected to change in Rust 1.3, but don't use it for
anything in this commit. Note that this is not a "significant" part of
the type (it's not part of the formal model) so we have to normalize
this away or trans starts to get confused because two equal types wind
up with distinct LLVM types.

9 years agoCode up the new lifetime default rules, but leave them disabled
Niko Matsakis [Wed, 17 Jun 2015 14:02:32 +0000 (10:02 -0400)]
Code up the new lifetime default rules, but leave them disabled
for now.

9 years agoAuto merge of #26378 - arielb1:unused-mut, r=pnkfelix
bors [Fri, 3 Jul 2015 21:31:46 +0000 (21:31 +0000)]
Auto merge of #26378 - arielb1:unused-mut, r=pnkfelix

This makes it somewhat more aggressive, so this is kind-of a [breaking-change] for these compiling with `#[deny(unused_mut)]`.

r? @pnkfelix

9 years agoAuto merge of #26762 - rick68:patch-9, r=alexcrichton
bors [Fri, 3 Jul 2015 19:59:52 +0000 (19:59 +0000)]
Auto merge of #26762 - rick68:patch-9, r=alexcrichton

Remove the tagged attribute `stable` from all private functions.

9 years agoUpdate atomic.rs
Wei-Ming Yang [Fri, 3 Jul 2015 19:24:25 +0000 (03:24 +0800)]
Update atomic.rs

Remove the tagged attribute `stable` from all private functions

9 years agoAuto merge of #26759 - dotdash:drop_dst, r=pnkfelix
bors [Fri, 3 Jul 2015 13:59:42 +0000 (13:59 +0000)]
Auto merge of #26759 - dotdash:drop_dst, r=pnkfelix

Fixes #26709

9 years agoFix ICE caused by Drop implementations for unsized types
Björn Steinbrink [Fri, 3 Jul 2015 10:19:36 +0000 (12:19 +0200)]
Fix ICE caused by Drop implementations for unsized types

Fixes #26709

9 years agoAuto merge of #26752 - frewsxcv:patch-25, r=alexcrichton
bors [Fri, 3 Jul 2015 07:13:57 +0000 (07:13 +0000)]
Auto merge of #26752 - frewsxcv:patch-25, r=alexcrichton

9 years agoFix 'Relaaxed' typo in code comment
Corey Farwell [Fri, 3 Jul 2015 07:13:02 +0000 (00:13 -0700)]
Fix 'Relaaxed' typo in code comment

9 years agoAuto merge of #26740 - steveklabnik:gh26737, r=gankro
bors [Fri, 3 Jul 2015 02:32:27 +0000 (02:32 +0000)]
Auto merge of #26740 - steveklabnik:gh26737, r=gankro

Fixes #26737.

9 years agoAuto merge of #26610 - aturon:fix_make_unique, r=alexcrichton
bors [Fri, 3 Jul 2015 01:00:31 +0000 (01:00 +0000)]
Auto merge of #26610 - aturon:fix_make_unique, r=alexcrichton

This commit resolves the race condition in the `get_mut` and
`make_unique` functions, which arose through interaction with weak
pointers. The basic strategy is to "lock" the weak pointer count when
trying to establish uniqueness, by reusing the field as a simple
spinlock. The overhead for normal use of `Arc` is expected to be minimal
-- it will be *none* when only strong pointers are used, and only
requires a move from atomic increment to CAS for usage of weak pointers.

The commit also removes the `unsafe` and deprecated status of these functions.

Closes #24880

r? @alexcrichton

cc @metajack @SimonSapin @Ms2ger

9 years agoAuto merge of #26733 - nhowell:update-jquery, r=steveklabnik
bors [Thu, 2 Jul 2015 23:28:20 +0000 (23:28 +0000)]
Auto merge of #26733 - nhowell:update-jquery, r=steveklabnik

r? @steveklabnik

9 years agoAuto merge of #26725 - tshepang:patch-2, r=bluss
bors [Thu, 2 Jul 2015 21:56:28 +0000 (21:56 +0000)]
Auto merge of #26725 - tshepang:patch-2, r=bluss

9 years agoFix race condition in Arc's get_mut and make_unqiue
Aaron Turon [Fri, 26 Jun 2015 21:32:34 +0000 (14:32 -0700)]
Fix race condition in Arc's get_mut and make_unqiue

This commit resolves the race condition in the `get_mut` and
`make_unique` functions, which arose through interaction with weak
pointers. The basic strategy is to "lock" the weak pointer count when
trying to establish uniqueness, by reusing the field as a simple
spinlock. The overhead for normal use of `Arc` is expected to be minimal
-- it will be *none* when only strong pointers are used, and only
requires a move from atomic increment to CAS for usage of weak pointers.

The commit also removes the `unsafe` and deprecated status of these
functions.

Along the way, the commit also improves several memory orderings, and
adds commentary about why various orderings suffice.

9 years agoAuto merge of #26738 - dotdash:trans_args, r=luqmana
bors [Thu, 2 Jul 2015 20:23:45 +0000 (20:23 +0000)]
Auto merge of #26738 - dotdash:trans_args, r=luqmana

The current split between create_datums_for_fn_args, copy_args_to_allocas and
store_arg involves a detour via rvalue datums which cause additional work in
form of insertvalue/extractvalue pairs for fat pointer arguments, and an extra
alloca and memcpy for tupled args in rust-call functions.

By merging those three functions into just one that actually covers the whole
process of creating the final argument datums, we can skip all that.  Also,
this allows to easily merge in the handling of rust-call functions, allowing to
make create_datum_for_fn_args_under_call_abi obsolete.

cc #26600 -- The insertvalue instructions kicked us off of fast-isel.

9 years agoAuto merge of #26682 - posix4e:netbsd, r=alexcrichton
bors [Thu, 2 Jul 2015 18:50:46 +0000 (18:50 +0000)]
Auto merge of #26682 - posix4e:netbsd, r=alexcrichton

This is dependent on https://github.com/rust-lang/rust-installer/pull/38. Once it is merged we most likely need to update the commit.

9 years agoAdd more description for from_raw_parts's unsafety
Steve Klabnik [Thu, 2 Jul 2015 17:00:58 +0000 (13:00 -0400)]
Add more description for from_raw_parts's unsafety

Fixes #26737.

9 years agoDirectly construct lvalue datums for function arguments
Björn Steinbrink [Thu, 2 Jul 2015 16:18:22 +0000 (18:18 +0200)]
Directly construct lvalue datums for function arguments

The current split between create_datums_for_fn_args,
copy_args_to_allocas and store_arg involves a detour via rvalue datums
which cause additional work in form of insertvalue/extractvalue pairs
for fat pointer arguments, and an extra alloca and memcpy for tupled
args in rust-call functions.

By merging those three functions into just one that actually covers the
whole process of creating the final argument datums, we can skip all
that. Also, this allows to easily merge in the handling of rust-call
functions, allowing to make create_datum_for_fn_args_under_call_abi
obsolete.

cc #26600 -- The insertvalue instructions kicked us off of fast-isel.

9 years agoAvoid a needless vector copy in type_of_rust_fn
Björn Steinbrink [Thu, 2 Jul 2015 16:16:16 +0000 (18:16 +0200)]
Avoid a needless vector copy in type_of_rust_fn

9 years agoSkip the pointless tupling/untupling of argument types in trans_closure
Björn Steinbrink [Thu, 2 Jul 2015 16:11:24 +0000 (18:11 +0200)]
Skip the pointless tupling/untupling of argument types in trans_closure

The tupling only happens for actual closures, same for the untupling.
The only code that actually sees the tupled types is some debugging
output for which it is actually rather confusing to have the types
tupled, because neither the function signature in Rust nor the
function signature for LLVM has them tupled.

9 years agoAuto merge of #26724 - tshepang:patch-1, r=bluss
bors [Thu, 2 Jul 2015 15:57:30 +0000 (15:57 +0000)]
Auto merge of #26724 - tshepang:patch-1, r=bluss

Also, the info is repeated in the following paragraph

9 years agoAuto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth
bors [Thu, 2 Jul 2015 14:23:02 +0000 (14:23 +0000)]
Auto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth

r? @Manishearth

9 years agoAuto merge of #26715 - steveklabnik:gh26497, r=huonw
bors [Thu, 2 Jul 2015 12:28:11 +0000 (12:28 +0000)]
Auto merge of #26715 - steveklabnik:gh26497, r=huonw

Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497

9 years agoAuto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth
bors [Thu, 2 Jul 2015 10:51:50 +0000 (10:51 +0000)]
Auto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth

Part of #24407.
cc @michaelsproul
r? @Manishearth

9 years agoAuto merge of #26727 - remram44:coerceunsized-weak, r=eddyb
bors [Thu, 2 Jul 2015 09:19:27 +0000 (09:19 +0000)]
Auto merge of #26727 - remram44:coerceunsized-weak, r=eddyb

This is a simple addition, shouldn't change behavior.

Fixes #26704

I don't know if the coercion for `Rc` is tested, if it is this probably needs the same test with `Weak`.

9 years agoAuto merge of #26722 - arielb1:log-deadlock, r=eddyb
bors [Thu, 2 Jul 2015 07:47:29 +0000 (07:47 +0000)]
Auto merge of #26722 - arielb1:log-deadlock, r=eddyb

These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.

r? @eddyb

9 years agoAuto merge of #26718 - nham:test-8640, r=alexcrichton
bors [Thu, 2 Jul 2015 06:14:54 +0000 (06:14 +0000)]
Auto merge of #26718 - nham:test-8640, r=alexcrichton

This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR https://github.com/rust-lang/rust/pull/19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.

9 years agoAuto merge of #26691 - nrc:mem, r=alexcrichton
bors [Thu, 2 Jul 2015 04:42:50 +0000 (04:42 +0000)]
Auto merge of #26691 - nrc:mem, r=alexcrichton

Reports the resident set size after each pass (linux-only).

r? @huonw or @alexcrichton

9 years agorustdoc: Update jQuery from 2.1.0 to 2.1.4
Nick Howell [Thu, 2 Jul 2015 03:52:40 +0000 (23:52 -0400)]
rustdoc: Update jQuery from 2.1.0 to 2.1.4

9 years agoAuto merge of #26677 - jroesch:fulfillment-context-refactor, r=nrc
bors [Thu, 2 Jul 2015 03:10:25 +0000 (03:10 +0000)]
Auto merge of #26677 - jroesch:fulfillment-context-refactor, r=nrc

This patch implements the next chunk of flattening out the type checking context. In a series of patches I moved around the necessary state and logic in order to delete the `Typer` and `ClosureTyper` traits. My next goal is to clean the interfaces and start to move the normalization code behind them.

r? @nrc I hope my PR is coherent, doing this too late at night ;)

9 years agoUpdate librustc_driver/test.rs
Jared Roesch [Thu, 2 Jul 2015 02:29:17 +0000 (19:29 -0700)]
Update librustc_driver/test.rs

9 years agoAdd netbsd amd64 support
Alex Newman [Wed, 1 Jul 2015 03:37:11 +0000 (20:37 -0700)]
Add netbsd amd64 support

9 years agoAuto merge of #26688 - nrc:map-parent-2, r=manishearth
bors [Thu, 2 Jul 2015 01:40:28 +0000 (01:40 +0000)]
Auto merge of #26688 - nrc:map-parent-2, r=manishearth

r? @Manishearth

9 years agoImplement CoerceUnsized for arc::Weak
Remi Rampin [Wed, 1 Jul 2015 21:58:05 +0000 (17:58 -0400)]
Implement CoerceUnsized for arc::Weak

9 years agoAdd test to dst-coerce-rc.rs
Remi Rampin [Wed, 1 Jul 2015 21:54:54 +0000 (17:54 -0400)]
Add test to dst-coerce-rc.rs

9 years agoReport memory use in time-passes
Nick Cameron [Sun, 28 Jun 2015 01:37:33 +0000 (18:37 -0700)]
Report memory use in time-passes

Reports the resident set size after each pass (linux-only).

9 years agodoc: add missing space
Tshepang Lekhonkhobe [Wed, 1 Jul 2015 21:08:50 +0000 (23:08 +0200)]
doc: add missing space

9 years agodoc: there is just one trait in here
Tshepang Lekhonkhobe [Wed, 1 Jul 2015 21:05:06 +0000 (23:05 +0200)]
doc: there is just one trait in here

Also, the info is repeated in the following paragraph

9 years agoRefactoring
Nick Cameron [Tue, 30 Jun 2015 20:58:48 +0000 (08:58 +1200)]
Refactoring

9 years agoFix deadlocks with RUST_LOG=rustc::middle::ty
Ariel Ben-Yehuda [Wed, 1 Jul 2015 20:07:26 +0000 (23:07 +0300)]
Fix deadlocks with RUST_LOG=rustc::middle::ty

These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.

9 years agoAddress nits
Jared Roesch [Wed, 1 Jul 2015 20:08:25 +0000 (13:08 -0700)]
Address nits

9 years agoImplement CoerceUnsized for rc::Weak
Remi Rampin [Wed, 1 Jul 2015 19:51:17 +0000 (15:51 -0400)]
Implement CoerceUnsized for rc::Weak

Fixes #26704

9 years agoAuto merge of #26658 - alexcrichton:windows-net-no-inherit, r=aturon
bors [Wed, 1 Jul 2015 19:28:15 +0000 (19:28 +0000)]
Auto merge of #26658 - alexcrichton:windows-net-no-inherit, r=aturon

This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.

Closes #26543

9 years agoAuto merge of #26034 - Gankro:deprecate-bits, r=alexcrichton
bors [Wed, 1 Jul 2015 17:55:20 +0000 (17:55 +0000)]
Auto merge of #26034 - Gankro:deprecate-bits, r=alexcrichton

I've mirrored them out to crates (bit-vec and bit-set) that build on stable.

(not sure if this actually correctly deprecates them in std)

9 years agofallout of bitvec/bitset deprecation
Alexis Beingessner [Tue, 30 Jun 2015 23:41:00 +0000 (16:41 -0700)]
fallout of bitvec/bitset deprecation

9 years agoAdd a regression test for #8640.
Nick Hamann [Wed, 1 Jul 2015 17:22:42 +0000 (12:22 -0500)]
Add a regression test for #8640.

This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR #19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.

9 years agoAdd E0277 error explanation
Guillaume Gomez [Wed, 1 Jul 2015 11:28:26 +0000 (13:28 +0200)]
Add E0277 error explanation

9 years agoAdd examples in error explanation E0267 and E0268
Guillaume Gomez [Wed, 1 Jul 2015 11:37:02 +0000 (13:37 +0200)]
Add examples in error explanation E0267 and E0268

9 years agoExpand docs for recv
Steve Klabnik [Wed, 1 Jul 2015 15:58:51 +0000 (11:58 -0400)]
Expand docs for recv

Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497

9 years agoAuto merge of #26675 - azerupi:doc-js-keyevent, r=alexcrichton
bors [Wed, 1 Jul 2015 16:21:10 +0000 (16:21 +0000)]
Auto merge of #26675 - azerupi:doc-js-keyevent, r=alexcrichton

Like explained in #26016, typing `?` had no effect with non-english keyboard layouts in the docs.

This patch seems to resolve this issue, **tested with AZERTY keyboard in Google Chrome and Firefox**. I haven't tested it with more exotic keyboard layouts or with other browsers though.

This code is based on the information found on: http://javascript.info/tutorial/keyboard-events

**More specifically:**

> The only event which reliably provides the character is keypress.

**And**

>```
// event.type must be keypress
function getChar(event) {
  if (event.which == null) {
    return String.fromCharCode(event.keyCode) // IE
  } else if (event.which!=0 && event.charCode!=0) {
    return String.fromCharCode(event.which)   // the rest
  } else {
    return null // special key
  }
}
```

`?` and `S` work, `escape` however does not (on an Azerty keyboard).

It would be good if some people could test it with other browsers and keyboard layouts: http://www.mathieudavid.org/test/rustdoc/std/index.html

**Edit:**
- swedish layout works on Firefox and Chromium
- french (azerty) mac layout works on Safari

9 years agoAuto merge of #26711 - bluss:doc-hide-rand, r=steveklabnik
bors [Wed, 1 Jul 2015 13:39:57 +0000 (13:39 +0000)]
Auto merge of #26711 - bluss:doc-hide-rand, r=steveklabnik

A follow up to #26530, hide SampleRange too. The numerical types implement this trait.

9 years agoAdd E0124 error explanation
Guillaume Gomez [Wed, 1 Jul 2015 11:07:29 +0000 (13:07 +0200)]
Add E0124 error explanation

9 years agoHide SampleRange trait from docs
Ulrik Sverdrup [Wed, 1 Jul 2015 10:05:57 +0000 (12:05 +0200)]
Hide SampleRange trait from docs

9 years agoAuto merge of #26540 - oli-obk:issue11715, r=nrc
bors [Wed, 1 Jul 2015 08:49:17 +0000 (08:49 +0000)]
Auto merge of #26540 - oli-obk:issue11715, r=nrc

closes #25037
closes #11715

r? @nrc

9 years agoIn js from the docs, change keyboard eventlistener to be compatible with non-english...
Mathieu David [Tue, 30 Jun 2015 07:32:15 +0000 (09:32 +0200)]
In js from the docs, change keyboard eventlistener to be compatible with non-english keyboard layouts. Fixes #26016 Fixes #16572

9 years agoAuto merge of #26703 - nrc:dxr-servo-fix, r=huonw
bors [Wed, 1 Jul 2015 07:04:53 +0000 (07:04 +0000)]
Auto merge of #26703 - nrc:dxr-servo-fix, r=huonw

r? @huonw

9 years agostd: Avoid the WSA_FLAG_NO_HANDLE_INHERIT option
Alex Crichton [Mon, 29 Jun 2015 16:46:35 +0000 (09:46 -0700)]
std: Avoid the WSA_FLAG_NO_HANDLE_INHERIT option

This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.

Closes #26543

9 years agosave-analysis: skip generated content in patterns
Nick Cameron [Wed, 1 Jul 2015 03:53:08 +0000 (15:53 +1200)]
save-analysis: skip generated content in patterns

9 years agoAuto merge of #26698 - alexcrichton:char-fmt, r=huonw
bors [Wed, 1 Jul 2015 03:35:46 +0000 (03:35 +0000)]
Auto merge of #26698 - alexcrichton:char-fmt, r=huonw

This recently regressed in #24689, and this updates the `Display` implementation
to take formatting flags into account.

Closes #26625

9 years agostd: Fix formatting flags for chars
Alex Crichton [Wed, 1 Jul 2015 02:26:03 +0000 (19:26 -0700)]
std: Fix formatting flags for chars

This recently regressed in #24689, and this updates the `Display` implementation
to take formatting flags into account.

Closes #26625

9 years agoAuto merge of #26696 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 30 Jun 2015 23:46:57 +0000 (23:46 +0000)]
Auto merge of #26696 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26373, #26506, #26580, #26622, #26627, #26651, #26678, #26692
- Failed merges:

9 years agoAuto merge of #26686 - arielb1:associated-type-defaults-actually-work, r=eddyb
bors [Tue, 30 Jun 2015 21:39:46 +0000 (21:39 +0000)]
Auto merge of #26686 - arielb1:associated-type-defaults-actually-work, r=eddyb

Fixes #26636.

r? @eddyb

9 years agoMake the unused_mut lint smarter with respect to locals.
Ariel Ben-Yehuda [Wed, 17 Jun 2015 22:02:58 +0000 (01:02 +0300)]
Make the unused_mut lint smarter with respect to locals.

Fixes #26332

9 years agoClean-up assignment checking in borrowck
Ariel Ben-Yehuda [Wed, 17 Jun 2015 18:54:22 +0000 (21:54 +0300)]
Clean-up assignment checking in borrowck

9 years agoAuto merge of #26663 - Eljay:fix-repr-attribute, r=sanxiyn
bors [Tue, 30 Jun 2015 20:07:18 +0000 (20:07 +0000)]
Auto merge of #26663 - Eljay:fix-repr-attribute, r=sanxiyn

Fixes #26646.

Loops over all `#[repr(..)]` attributes instead of stopping at the first one to make sure they are all marked as used. Previously it stopped after the first `#[repr(C)]` was found causing all other attributes to be skipped by the linter.

9 years agoRollup merge of #26692 - steveklabnik:gh26620, r=alexcrichton
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26692 - steveklabnik:gh26620, r=alexcrichton

Fixes #26620

9 years agoMake note of Ord's derive ordering
Steve Klabnik [Tue, 30 Jun 2015 22:46:31 +0000 (18:46 -0400)]
Make note of Ord's derive ordering

Fixes #26620

9 years agoRollup merge of #26678 - bluss:doc-fmt, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26678 - bluss:doc-fmt, r=steveklabnik

fmt: Update docs and mention :#? pretty-printing

Expose `:#?` well in the docs for fmt and Debug itself. Also update some out of date information and fix formatting in `std::fmt` docs.

9 years agoRollup merge of #26651 - GuillaumeGomez:patch-2, r=Manishearth
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26651 - GuillaumeGomez:patch-2, r=Manishearth

Part of #24407.
cc @michaelsproul
r? @Manishearth

9 years agoRollup merge of #26627 - tshepang:stdin-example, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:45 +0000 (15:37 -0400)]
Rollup merge of #26627 - tshepang:stdin-example, r=steveklabnik

9 years agoRollup merge of #26622 - tshepang:indents, r=sanxiyn
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26622 - tshepang:indents, r=sanxiyn

9 years agoRollup merge of #26580 - adamheins:master, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26580 - adamheins:master, r=steveklabnik

I found a sentence that felt a bit awkward to read in its current form, so I added a comma to break it up.

9 years agoRollup merge of #26506 - tshepang:doc-fix, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26506 - tshepang:doc-fix, r=steveklabnik

9 years agoRollup merge of #26373 - tshepang:patch-2, r=steveklabnik
Steve Klabnik [Tue, 30 Jun 2015 19:37:44 +0000 (15:37 -0400)]
Rollup merge of #26373 - tshepang:patch-2, r=steveklabnik

9 years agoActually encode default associated types
Ariel Ben-Yehuda [Tue, 30 Jun 2015 19:03:25 +0000 (22:03 +0300)]
Actually encode default associated types

Fixes #26636

9 years agoAuto merge of #26327 - bluss:two-way, r=aturon
bors [Tue, 30 Jun 2015 18:09:51 +0000 (18:09 +0000)]
Auto merge of #26327 - bluss:two-way, r=aturon

Update substring search to use the Two Way algorithm

To improve our substring search performance, revive the two way searcher
and adapt it to the Pattern API.

Fixes #25483, a performance bug: that particular case now completes faster
in optimized rust than in ruby (but they share the same order of magnitude).

Many thanks to @gereeter who helped me understand the reverse case
better and wrote the comment explaining `next_back` in the code.

I had quickcheck to fuzz test forward and reverse searching thoroughly.

The two way searcher implements both forward and reverse search,
but not double ended search. The forward and reverse parts of the two
way searcher are completely independent.

The two way searcher algorithm has very small, constant space overhead,
requiring no dynamic allocation. Our implementation is relatively fast,
especially due to the `byteset` addition to the algorithm, which speeds
up many no-match cases.

A bad case for the two way algorithm is:

```
let haystack = (0..10_000).map(|_| "dac").collect::<String>();
let needle = (0..100).map(|_| "bac").collect::<String>());
```

For this particular case, two way is not much faster than the naive
implementation it replaces.

9 years agodoc: add example for Stdin::read_line
Tshepang Lekhonkhobe [Sat, 27 Jun 2015 20:58:49 +0000 (22:58 +0200)]
doc: add example for Stdin::read_line

9 years agoDeprecate BitSet and BitVec in favour of bit-vec and bit-set crates in cargo
Alexis Beingessner [Fri, 5 Jun 2015 19:43:32 +0000 (12:43 -0700)]
Deprecate BitSet and BitVec in favour of bit-vec and bit-set crates in cargo

9 years agoAdd E0119 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 10:35:01 +0000 (12:35 +0200)]
Add E0119 error explanation

Add more explanations

9 years agoAdd E0207 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 10:12:45 +0000 (12:12 +0200)]
Add E0207 error explanation

9 years agoAdd E0117 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 09:57:47 +0000 (11:57 +0200)]
Add E0117 error explanation

9 years agoAdd E0101 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 09:19:16 +0000 (11:19 +0200)]
Add E0101 error explanation

9 years agoAdd E0092 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:58:52 +0000 (10:58 +0200)]
Add E0092 error explanation

9 years agoAdd E0211 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:47:49 +0000 (10:47 +0200)]
Add E0211 error explanation

9 years agoAdd E0094 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:44:20 +0000 (10:44 +0200)]
Add E0094 error explanation

9 years agoAdd E0093 error explanation
Guillaume Gomez [Tue, 30 Jun 2015 08:35:46 +0000 (10:35 +0200)]
Add E0093 error explanation

9 years agoAdd E0195 error explanation
Guillaume Gomez [Mon, 29 Jun 2015 14:00:57 +0000 (16:00 +0200)]
Add E0195 error explanation

9 years agoAuto merge of #26669 - frewsxcv:diagnostics-https, r=huonw
bors [Tue, 30 Jun 2015 15:13:05 +0000 (15:13 +0000)]
Auto merge of #26669 - frewsxcv:diagnostics-https, r=huonw

None

9 years agoAuto merge of #26664 - steveklabnik:gh26571, r=alexcrichton
bors [Tue, 30 Jun 2015 12:54:16 +0000 (12:54 +0000)]
Auto merge of #26664 - steveklabnik:gh26571, r=alexcrichton

This was pretty misleading, so let's improve.

Fixes #26571

9 years agofmt: Update docs and mention :#? pretty-printing
Ulrik Sverdrup [Tue, 30 Jun 2015 12:10:24 +0000 (14:10 +0200)]
fmt: Update docs and mention :#? pretty-printing