- 17 2月, 2015 24 次提交
-
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
"body": null,
-
由 Manish Goregaokar 提交于
Since we don’t have Deprecated stability level anymore, the only other source of information is deprecated-since version, which conveniently to us, only exists if the symbol is deprecated. Fixes #21789
-
由 Manish Goregaokar 提交于
`IntoIterator` now has an extra associated item: ``` rust trait IntoIterator { type Item; type IntoIter: Iterator<Self=Self::Item>; } ``` This lets you bind the iterator \"`Item`\" directly when writing generic functions: ``` rust // hypothetical change, not included in this PR impl Extend<T> for Vec<T> { // you can now write fn extend<I>(&mut self, it: I) where I: IntoIterator<Item=T> { .. } // instead of fn extend<I: IntoIterator>(&mut self, it: I) where I::IntoIter: Iterator<Item=T> { .. } } ``` The downside is that now you have to write an extra associated type in your `IntoIterator` implementations: ``` diff impl<T> IntoIterator for Vec<T> { + type Item = T; type IntoIter = IntoIter<T>; fn into_iter(self) -> IntoIter<T> { .. } } ``` Because this breaks all downstream implementations of `IntoIterator`, this is a [breaking-change] --- r? @aturon
-
由 Manish Goregaokar 提交于
`cp -a` is a GNU extension. Use an alternate combinaison of POSIX options (`-PRp`) that do nearly the same. The difference is `-a` will preserve context, links and xattr attributes, whereas `-p` not. But as we use it only for copy a file, there is no difference in the current context.
-
由 Manish Goregaokar 提交于
Appears to be just an oversight given it is the only method in a stable trait. r? @aturon because you did final alpha stabilisation of iterators.
-
由 Manish Goregaokar 提交于
book/syntax-extensions.html was renamed to book/plugins.html, the link should be also updated. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Manish Goregaokar 提交于
The Rust Programming Language book has no explanation of what `i32` actually means. I have added an explanation for the first time the reader encounters this type.
-
由 Manish Goregaokar 提交于
@steveklabnik Trying out the Glossary idea. Added the paragraph about 'complicated words' because I think it would be useful to those contributing to the book. Maybe this should not be here
-
由 Manish Goregaokar 提交于
This snuck through my refactor. Would it be worth the effort to have a test pass that attempts to lint the code for all targets, even if it's not feasible to actually build and test it?
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
Fixes #22357 Before and after: ![screenshot from 2015-02-15 15 53 24](https://cloud.githubusercontent.com/assets/679122/6203452/dbde7324-b52b-11e4-8252-da96a44c1cf3.png)
-
由 Manish Goregaokar 提交于
#21568
-
由 Manish Goregaokar 提交于
Without the adjustments the retslot might have the wrong type, e.g. when the return value is implicitly coerced to a trait object. Fixes #22346
-
由 Manish Goregaokar 提交于
The book in "hello-world" tells that there are configs for some programs and gives a link to main repo's src/etc. Actually, these configs moved to separate repos some days ago. This PR adds a markdown file with links and moves "hello-world" link about editors to point directly to this new file.
-
由 Manish Goregaokar 提交于
`pipe(2)`, under FreeBSD and OpenBSD return a bidirectionnal pipe. So reading from the writer would block (waiting data) instead of returning an error. like for FreeBSD, disable the test for OpenBSD.
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
This is a patch for #22291. PLEASE_BENCH=1 adds --bench to the arguments passed to the executable to be tested. At the moment, compiletest does not accept a --bench argument, because it is not needed for any test in src/test/, even the tests in src/test/bench do not use #[bench]. I have updated the makefile to only add the --bench flag for crate tests. I do not think that changing compiletest add --bench to the run arguments of all compile tests makes sense, because it would mess up tests which check command line arguments. Also the bench option can be added as comment in a compile test as well.
-
-
由 Manish Goregaokar 提交于
It is not totally clear if we should just use whitespace, or if the full unicode word-breaking algorithm is more correct. If there is demand we can reconsider this decision (and consider the precise algorithm to use in detail). cc #15628.
-
由 bors 提交于
Implement rules described in rust-lang/rfcs#599. Fixes https://github.com/rust-lang/rust/issues/22211. ~~Based atop PR https://github.com/rust-lang/rust/pull/22182, so the first few commits (up to and including "Pacify the mercilous nrc") have already been reviewed.~~
-
由 Niko Matsakis 提交于
-
由 bors 提交于
This includes everything necessary for promoting borrows of constant rvalues to `'static`. That is, `&expr` will have the type `&'static T` if `const T: &'static T = &expr;` is valid. There is a small exception, dereferences of raw pointers, as they misbehave. They still "work" in constants as I didn't want to break legitimate uses (are there any?). The qualification done here can be expanded to allow simple CTFE via `const fn`.
-
- 16 2月, 2015 16 次提交
-
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
Fix fallout in libsyntax from RFC 599. Clarity and efficiency seems to be mostly improved, to my eye. Nonetheless, as this commit demonstrates, the previous commits was a [breaking-change]. In practice, breakage is focused on functions of this form: ```rust fn foo(..., object: Box<FnMut()>) ```` where `FnMut()` could be any trait object type. The older scheme defaulted objects in argument position so that they were bounded by a fresh lifetime: ```rust fn foo<'a>(..., object: Box<FnMut()+'a>) ``` This meant that the object could contain borrowed data. The newer scheme defaults to a lifetime bound of `'static`: ```rust fn foo(..., object: Box<FnMut()+'static>) ``` This means that the object cannot contain borrowed data. In some cases, the best fix is to stop using `Box`: ```rust fn foo(..., object: &mut FnMut()) ``` but another option is to write an explicit annotation for the `'a` lifetime that used to be implicit. Both fixes are demonstrated in this commit.
-
由 Niko Matsakis 提交于
Fixes #22211.
-
由 Niko Matsakis 提交于
complete set of regions are available when converting types.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
Various simplifications and renamings based on the fact that old-school closures are gone and type parameters can now have multiple region bounds (and hence use a different path). Should have no effect on the external behavior of the compiler.
-
由 Niko Matsakis 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-