Commit Graph

39092 Commits

Author SHA1 Message Date
Dan Connolly
72316c349e fix markup of "just one effect, unsafe"
the punch line was cut off!
2015-02-19 23:35:33 -06:00
Ivan Petkov
be0dc49675 Unsafe lint will also check for other unsafe code
Checks include declaration/implementation of unsafe functions, traits,
and methods.

This allows warning or forbidding all uses of unsafe code, whereas
previously only unsafe blocks were caught by the lint.

The lint has been renamed from `unsafe-blocks` to `unsafe-code` to
reflect its new purpose.

This is a minor [breaking-change]

Closes #22430
2015-02-19 20:43:09 -08:00
Erick Tryzelaar
ded93b125f std: Update the std::io adaptors to proxy all methods 2015-02-19 20:39:01 -08:00
Brian Anderson
96be55376e book: Minor clarifications about strings 2015-02-19 18:39:38 -08:00
Marvin Löbel
c8dd2d066d Addressed PR comments 2015-02-20 00:58:15 +01:00
Marvin Löbel
a641996796 Fix tidy and rebase fallout
Added a few bugfixes and additional testcases
2015-02-20 00:58:07 +01:00
Marvin Löbel
c1de0a0f9e Added a Pattern impl that delegates to the dereference of a type.
This allows to match with a `&String` or `&&str`, for example.
2015-02-20 00:58:06 +01:00
Marvin Löbel
ee930b0262 Enabled new pattern API in the libstd facade 2015-02-20 00:58:06 +01:00
Marvin Löbel
f9ef8cd555 Refactored code into Searcher traits with naive implementations
Made the family of Split iterators use the Pattern API

Renamed the Matcher traits into Searcher
2015-02-20 00:57:38 +01:00
Marvin Löbel
13ea9062a9 Made match_indices use the generic pattern API 2015-02-20 00:32:59 +01:00
Marvin Löbel
bc09c1ddc5 Made str::MatchIndices a private implementantion detail 2015-02-20 00:32:59 +01:00
Marvin Löbel
54f0bead81 Added string pattern traits and basic implementantions 2015-02-20 00:32:59 +01:00
Marvin Löbel
d68eb3d248 Added benchmarks for string pattern matching functions 2015-02-20 00:32:59 +01:00
bombless
b13e072c9e Remove questionable pattern 2015-02-20 03:36:40 +08:00
Kevin Butler
6172986cc9 typo: fucntion -> function 2015-02-19 19:22:31 +00:00
bombless
0643494bc4 Fix tests 2015-02-20 03:10:31 +08:00
bors
522d09dfec Auto merge of #22541 - Manishearth:rollup, r=Gankro
Continued from #22520
2015-02-19 18:36:59 +00:00
Manish Goregaokar
49771bafa5 Round 8 tex fixes 2015-02-19 23:18:20 +05:30
Alex Crichton
163be7525a Merge remote-tracking branch 'origin/master' into rollup 2015-02-19 07:03:43 -08:00
Alex Crichton
0cd54b85ef Round 5 test fixes and rebase conflicts 2015-02-19 07:03:18 -08:00
bombless
61ea8b33d0 Fix issue #22426 #22447 2015-02-19 22:01:57 +08:00
bors
0b664bb843 Auto merge of #22517 - brson:relnotes, r=Gankro
p=1 please
2015-02-19 10:54:08 +00:00
Björn Steinbrink
07c0faa407 Fix an ICE when translating if loop {} {}
In `if loop {} {}`, the `if` is actually unreachable, but we didn't
handle that correctly and when trying to translate the `if` we tried to
branch on the "return value" of the loop expression, which is not an
`i1` and therefore triggered an LLVM assertion.
2015-02-19 11:46:47 +01:00
bors
149f002437 Auto merge of #22497 - nikomatsakis:suffixes, r=alexcrichton
The old suffixes now issue warnings unless a feature-gate is given.

Fixes #22496.

r? @alexcrichton
2015-02-19 07:59:27 +00:00
Steven Crockett
e0067f9852 docs: correct guessing game to mention old_io module instead of io
The text is referring to the io module despite the code using the old_io module.
2015-02-19 05:13:49 +00:00
Keegan McAllister
1597f915c5 borrowck/README.md: Normalize types in examples 2015-02-18 20:46:21 -08:00
Keegan McAllister
f051e13238 Fix references to doc.rs throughout the code 2015-02-18 19:54:45 -08:00
Keegan McAllister
ac6cab0887 borrowck/README.md: Fix display of code on GitHub 2015-02-18 19:54:45 -08:00
Keegan McAllister
160cf962e7 borrowck/README.md: Remove SCOPE (mostly unused)
Only one case is used in the text.  All of them are pretty straightforward, so
I don't think the code needs an explicit link to the README.
2015-02-18 19:54:38 -08:00
Darrell Hamilton
a6b47c0efa Fixes "Code of Conduct" Link
Replaces the markdown link delimiters for the "Code of Conduct" link with the appropriate delimiters for using a link id

r? @steveklabnik
2015-02-18 20:53:00 -07:00
Keegan McAllister
0c1fc1ca7b borrowck/README.md: Clarify MUTABILITY and ALIASABLE 2015-02-18 18:07:03 -08:00
Alex Crichton
cb29c468f3 Fix from niko for cfail tests 2015-02-18 18:01:03 -08:00
Keegan McAllister
bb22c100db borrowck/README.md: Remove most references to &const 2015-02-18 17:59:47 -08:00
Alex Crichton
b8d35deda3 rollup merge of #22517: brson/relnotes
p=1 please
2015-02-18 17:58:01 -08:00
Alex Crichton
b7c0813eb7 Round 4 test fixes and rebase conflicts 2015-02-18 17:57:35 -08:00
Brian Anderson
c4bb064b3a Update AUTHORS.txt and RELEASES.md 2015-02-18 17:02:34 -08:00
Niko Matsakis
63f51ee90c Exempt phantom fns from the object safety check 2015-02-18 16:38:17 -08:00
Alex Crichton
d6e939a2df Round 3 test fixes and conflicts 2015-02-18 16:34:04 -08:00
Adam Jacob
cec404a066 Add documentation for else if to trpl
Adds an example of `else if` to the If section of The Rust Programming
Language.

r? @steveklabnik
2015-02-18 16:26:39 -08:00
bors
22992358bc Auto merge of #22436 - nikomatsakis:issue-22246-bound-lifetimes-of-assoc-types, r=nikomatsakis
Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.)

r? @pnkfelix (for now, anyway)
cc @aturon 

[implied bounds]: http://smallcultfollowing.com/babysteps/blog/2014/07/06/implied-bounds/
2015-02-18 23:58:38 +00:00
Alex Crichton
1506b34e0c rollup merge of #22286: nikomatsakis/variance-4b
Conflicts:
	src/librustc/middle/infer/combine.rs
	src/librustc_typeck/check/wf.rs
2015-02-18 15:52:01 -08:00
Alex Crichton
3e7a04cb3c Round 2 test fixes and conflicts 2015-02-18 15:48:45 -08:00
Alex Crichton
231eeaa35b rollup merge of #22502: nikomatsakis/deprecate-bracket-bracket
Conflicts:
	src/libcollections/slice.rs
	src/libcollections/str.rs
	src/librustc/middle/lang_items.rs
	src/librustc_back/rpath.rs
	src/librustc_typeck/check/regionck.rs
	src/libstd/ffi/os_str.rs
	src/libsyntax/diagnostic.rs
	src/libsyntax/parse/parser.rs
	src/libsyntax/util/interner.rs
	src/test/run-pass/regions-refcell.rs
2015-02-18 15:48:40 -08:00
Alex Crichton
2cdbd288ac rollup merge of #22210: aturon/stab-final-borrow
Conflicts:
	src/libcollections/btree/map.rs
	src/libcollections/str.rs
	src/libcollections/vec.rs
	src/libcore/borrow.rs
	src/libcore/hash/mod.rs
	src/libstd/collections/hash/map.rs
	src/libstd/collections/hash/set.rs
2015-02-18 15:34:48 -08:00
Alex Crichton
365bd9a9e3 Round 1 fixes and rebase conflicts 2015-02-18 15:27:42 -08:00
Aaron Turon
a99e698628 Stabilize std::borrow
This commit stabilizes `std::borrow`, making the following modifications
to catch up the API with language changes:

* It renames `BorrowFrom` to `Borrow`, as was originally intended (but
  blocked for technical reasons), and reorders the parameters
  accordingly.

* It moves the type parameter of `ToOwned` to an associated type. This
  is somewhat less flexible, in that each borrowed type must have a
  unique owned type, but leads to a significant simplification for
  `Cow`. Flexibility can be regained by using newtyped slices, which is
  advisable for other reasons anyway.

* It removes the owned type parameter from `Cow`, making the type much
  less verbose.

* Deprecates the `is_owned` and `is_borrowed` predicates in favor of
  direct matching.

The above API changes are relatively minor; the basic functionality
remains the same, and essentially the whole module is now marked
`#[stable]`.

[breaking-change]
2015-02-18 15:23:58 -08:00
Niko Matsakis
9ea84aeed4 Replace all uses of &foo[] with &foo[..] en masse. 2015-02-18 17:36:03 -05:00
Niko Matsakis
64cd30e0ca Declare &foo[] to be obsolete syntax. Modify the obsolete mechanism to
support warnings.
2015-02-18 17:35:50 -05:00
Alex Crichton
b64dfff326 rollup merge of #22498: nagisa/style-fixes 2015-02-18 14:35:03 -08:00
Alex Crichton
5250a82f79 rollup merge of #22497: nikomatsakis/suffixes
Conflicts:
	src/librustc_trans/trans/tvec.rs
2015-02-18 14:35:01 -08:00