]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #9497 : pnkfelix/rust/fsk-7752-use-fcnptr-for-glob-errfunc, r=cmr
bors [Thu, 26 Sep 2013 11:16:03 +0000 (04:16 -0700)]
auto merge of #9497 : pnkfelix/rust/fsk-7752-use-fcnptr-for-glob-errfunc, r=cmr

Fix #7752.

~~(The glob API is a little funky; I tried to make a small test for it, which I'll add to the end of this description, and its not clear whether globfree is supposed to free solely the structure allocated by glob itself, or if it is going to try to free more than that.)~~ (The previous note was a user-error: I was misusing the CString API.)

Anyway, this seems to work in terms of calling errfunc where expected.)

```rust
#[allow(unused_imports)];
use std::libc::types::os::arch::c95::{c_char, c_int, size_t};
use std::libc::funcs::posix01::glob;
use std::libc::types::os::common::posix01::glob_t;
use std::libc::consts::os::posix01::{GLOB_APPEND, GLOB_DOOFFS, GLOB_ERR,
                                     GLOB_MARK, GLOB_NOCHECK, GLOB_NOSORT,
                                     GLOB_NOESCAPE, GLOB_NOSPACE,
                                     GLOB_ABORTED, GLOB_NOMATCH};
use std::ptr;
use std::c_str;

#[fixed_stack_segment]
fn main() {
    let mut g = glob_t {
        gl_pathc:  0, // size_t,
        __unused1: 0, // c_int,
        gl_offs:   2, // size_t,
        __unused2: 0, // c_int,
        gl_pathv:  ptr::null(), // **c_char,

        __unused3: ptr::null(), // *c_void,

        __unused4: ptr::null(), // *c_void,
        __unused5: ptr::null(), // *c_void,
        __unused6: ptr::null(), // *c_void,
        __unused7: ptr::null(), // *c_void,
        __unused8: ptr::null(), // *c_void,
    };

    extern "C" fn errfunc(_epath: *c_char, _errno: int) -> int {
        println!("errfunc called");
        return 0;
    }

    struct Reduced { pathc: size_t, offs: size_t, pathv: **c_char, }
    impl Reduced {
        fn from(g: &glob_t) -> Reduced {
            Reduced {pathc: g.gl_pathc, offs: g.gl_offs, pathv: g.gl_pathv}
        }
    }

    do ("*.rs/*").with_c_str |pat| {
        println!("calling glob");
        unsafe { glob::glob(pat, GLOB_DOOFFS, errfunc, &mut g); }
        println!("After glob call");

        println!("g: {:?}", Reduced::from(&g));
        for i in range(0, g.gl_pathc as int) {
            unsafe {
                let p : **c_char = ptr::offset(g.gl_pathv, g.gl_offs as int + i);
                let x = c_str::CString::new(*p, false);
                match x.as_str() {
                    Some(s) => {
                        println!("gl_pathc[{:d}]: {:?}", i, s);
                    }
                    None => {
                        println!("gl_pathc[{:d}]: unvalid", i);
                    }
                }
            }
        }
    }

    println!("calling globfree on g: {:?}", g);
    unsafe { glob::globfree(&mut g); }
    println!("after globfree call");

}

```

10 years agoauto merge of #9464 : bmaxa/rust/master, r=cmr
bors [Thu, 26 Sep 2013 09:56:03 +0000 (02:56 -0700)]
auto merge of #9464 : bmaxa/rust/master, r=cmr

I have tried this fix and it seems to work either with single or multiple trait inheritance.

trait Base:Base2 + Base3{
fn foo(&self);
}

trait Base2 {
fn baz(&self);
}

trait Base3{
fn root(&self);
}

trait Super: Base{
fn bar(&self);
}

struct X;

impl Base for X {
fn foo(&self) {
println("base foo");
}

}
impl Base2 for X {
fn baz(&self) {
println("base2 baz");
}

}
impl Base3 for X {
fn root(&self) {
println("base3 root");
}

}
impl Super for X {
fn bar(&self) {
println("super bar");
}
}

fn main() {
let n = X;
let s = &n as &Super;
s.bar();
s.foo(); // super bar
s.baz();
s.root();
}

bmaxa@maxa:~/examples/rust$ rustc error.rs
bmaxa@maxa:~/examples/rust$ ./error
super bar
base foo
base2 baz
base3 root

10 years ago fix for issue #9394
Branimir [Wed, 25 Sep 2013 21:55:38 +0000 (23:55 +0200)]
fix for issue #9394

    This solves problem of incorrect indexing into vtable
    when method from super trait was called through pointer
    to derived trait.
    Problem was that offset of super trait vtables
    was not calculated at all.
    Now it works, correct offset is calculated by
    traversing all super traits up to super trait
    where method belongs. That is how it is
    intended to work.

10 years agoauto merge of #9490 : alexcrichton/rust/issue-9487, r=cmr
bors [Thu, 26 Sep 2013 07:30:57 +0000 (00:30 -0700)]
auto merge of #9490 : alexcrichton/rust/issue-9487, r=cmr

If there's no TLS key just yet, then there's nothing to unsafely borrow, so
continue returning None. This prevents causing the runtime to abort itself when
logging before the runtime is fully initialized.

Closes #9487

r? @brson

10 years agoauto merge of #9404 : blake2-ppc/rust/result-map-opt, r=cmr
bors [Thu, 26 Sep 2013 05:30:53 +0000 (22:30 -0700)]
auto merge of #9404 : blake2-ppc/rust/result-map-opt, r=cmr

std::result: Remove function `map_opt`.

This function has never had any users in the tree, so this is my
initiative to remove this function.

10 years agoauto merge of #9392 : Kimundi/rust/str_docs, r=cmr
bors [Thu, 26 Sep 2013 04:10:57 +0000 (21:10 -0700)]
auto merge of #9392 : Kimundi/rust/str_docs, r=cmr

Moved `StrSlice` doc comments from impl to trait.
Moved `OwnedStr` doc comments from impl to trait.
Normalized a few `StrSlice` method names from `FOO_reverse`, `FOO_rev` and `rFOO` to `FOO_rev`.
Added a few `#[inline]` hints.

The doc comment changes make the source a bit harder to read, as documentation and implementation no longer live right next to each other. But this way they at least appear in the docs.

10 years agoauto merge of #9499 : brson/rust/relnotes, r=cmr
bors [Thu, 26 Sep 2013 02:50:56 +0000 (19:50 -0700)]
auto merge of #9499 : brson/rust/relnotes, r=cmr

10 years agoMoved StrSlice doc comments from impl to trait.
Marvin Löbel [Wed, 25 Sep 2013 23:18:50 +0000 (01:18 +0200)]
Moved StrSlice doc comments from impl to trait.
Moved OwnedStr doc comments from impl to trait.
Added a few #[inline] hints.

The doc comment changes make the source a bit harder to read, as
documentation and implementation no longer live right next to each
other. But this way they at least appear in the docs.

10 years agoauto merge of #9502 : brson/rust/fix-logo-icon, r=brson
bors [Thu, 26 Sep 2013 00:55:53 +0000 (17:55 -0700)]
auto merge of #9502 : brson/rust/fix-logo-icon, r=brson

10 years agoauto merge of #9475 : alexcrichton/rust/rustdoc++, r=cmr
bors [Wed, 25 Sep 2013 22:40:52 +0000 (15:40 -0700)]
auto merge of #9475 : alexcrichton/rust/rustdoc++, r=cmr

The commit messages are a good technical summary, a good visual summary (contrib is this version):

Pub use statements now rendered. Notice how almost all components are also clickable!
* http://static.rust-lang.org/doc/master/std/prelude/index.html
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/prelude/index.html

Private things hidden by default (for at least some approximation of privacy). I hope to improve this once privacy is totally ironed out.
* http://static.rust-lang.org/doc/master/std/hashmap/struct.HashMap.html
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/hashmap/struct.HashMap.html

Unindentation now works properly:
* http://static.rust-lang.org/doc/master/extra/getopts/index.html
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/extra/getopts/index.html

Also sundown has massively reduced compilation time (of docs, not the of the crates)

10 years agoFix the rust logo icon
Brian Anderson [Wed, 25 Sep 2013 22:21:37 +0000 (15:21 -0700)]
Fix the rust logo icon

10 years agostop fighting with rust logo filetype.
Felix S. Klock II [Wed, 25 Sep 2013 21:51:33 +0000 (23:51 +0200)]
stop fighting with rust logo filetype.

10 years agoerrfunc ptr is nullable, so use Option as part of interface to glob (#7752).
Felix S. Klock II [Wed, 25 Sep 2013 21:38:59 +0000 (23:38 +0200)]
errfunc ptr is nullable, so use Option as part of interface to glob (#7752).

10 years agorustdoc: Fix merge fallout
Alex Crichton [Wed, 25 Sep 2013 21:28:20 +0000 (14:28 -0700)]
rustdoc: Fix merge fallout

10 years agorustdoc: Fix an unindentation bug when collapsing
Alex Crichton [Tue, 24 Sep 2013 23:53:21 +0000 (16:53 -0700)]
rustdoc: Fix an unindentation bug when collapsing

Turns out eagerly trimming comes back to bite you :(

10 years agorustdoc: Collapse before unindenting
Alex Crichton [Tue, 24 Sep 2013 23:08:07 +0000 (16:08 -0700)]
rustdoc: Collapse before unindenting

Doesn't make much sense to unindent each line individually and *then* collapse
them all together.

10 years agorustdoc: Reduce ambiguity with clean::Type
Alex Crichton [Tue, 24 Sep 2013 20:53:09 +0000 (13:53 -0700)]
rustdoc: Reduce ambiguity with clean::Type

The "Unresolved" variant could be completely removed becuase it turns out that
the interim state only very briefly lives.

10 years agorustdoc: Strip hidden docs by default.
Alex Crichton [Tue, 24 Sep 2013 21:09:11 +0000 (14:09 -0700)]
rustdoc: Strip hidden docs by default.

10 years agorustdoc: Highlight function names
Alex Crichton [Tue, 24 Sep 2013 21:07:13 +0000 (14:07 -0700)]
rustdoc: Highlight function names

Closes #9460

10 years agorustdoc: Start rendering variants (redirect to enum)
Alex Crichton [Tue, 24 Sep 2013 20:57:31 +0000 (13:57 -0700)]
rustdoc: Start rendering variants (redirect to enum)

This allows reasonable behavior when an enum is clicked in an import.

10 years agorustdoc: Linkify all reexports.
Alex Crichton [Tue, 24 Sep 2013 20:56:52 +0000 (13:56 -0700)]
rustdoc: Linkify all reexports.

This way each component of a reexport path is click-able to the destination that
it's referencing.

10 years agorustdoc: Implement stripping based on privacy
Alex Crichton [Tue, 24 Sep 2013 20:55:22 +0000 (13:55 -0700)]
rustdoc: Implement stripping based on privacy

This will probably need to get tweaked once the privacy rules have been fully
agreed on, but for now this has all of the infrastructure necessary for
filtering out private items.

Closes #9410

10 years agorustdoc: Emit purity to function dox for traits
Alex Crichton [Tue, 24 Sep 2013 03:38:17 +0000 (20:38 -0700)]
rustdoc: Emit purity to function dox for traits

Closes #3804

10 years agorustdoc: Add the ability to list all passes
Alex Crichton [Mon, 23 Sep 2013 23:25:58 +0000 (16:25 -0700)]
rustdoc: Add the ability to list all passes

In doing so, also remove the collapse-privacy pass because it's a little
over-zealous and may not be right 100% of the time (not used right now as well)

10 years agorustdoc: Improve comment stripping
Alex Crichton [Mon, 23 Sep 2013 21:18:26 +0000 (14:18 -0700)]
rustdoc: Improve comment stripping

There is less implicit removal of various comment styles, and it also removes
extraneous stars occasionally found in docblock comments. It turns out that the
bug for getops was just a differently formatted block.

Closes #9425
Closes #9417

10 years agorustdoc: Enable various useful markdown extensions
Alex Crichton [Tue, 24 Sep 2013 00:52:57 +0000 (17:52 -0700)]
rustdoc: Enable various useful markdown extensions

10 years agorustdoc: Change all code-blocks with a script
Alex Crichton [Tue, 24 Sep 2013 00:20:36 +0000 (17:20 -0700)]
rustdoc: Change all code-blocks with a script

    find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g'
    find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g'
    find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'

10 years agorustdoc: Use sundown for markdown highlighting
Alex Crichton [Mon, 23 Sep 2013 23:55:48 +0000 (16:55 -0700)]
rustdoc: Use sundown for markdown highlighting

This takes rendering times of documentation down from 30s to 0.5s. Kinda sad
that none of the parallelism is needed, but oh well!

Closes #7380
cc #3546

10 years agorustdoc: Add sundown to src/rt/
Alex Crichton [Mon, 23 Sep 2013 22:35:09 +0000 (15:35 -0700)]
rustdoc: Add sundown to src/rt/

This also starts compiling it in the same manner as linenoise, it's just bundled
with librustrt directly, and we export just a few symbols out of it.

10 years agoauto merge of #9345 : Dretch/rust/digest-result-bytes, r=cmr
bors [Wed, 25 Sep 2013 21:25:52 +0000 (14:25 -0700)]
auto merge of #9345 : Dretch/rust/digest-result-bytes, r=cmr

I would find this function useful.

10 years agoauto merge of #9498 : catamorphism/rust/rust-path-hack-fix, r=cmr,metajack
bors [Wed, 25 Sep 2013 19:45:54 +0000 (12:45 -0700)]
auto merge of #9498 : catamorphism/rust/rust-path-hack-fix, r=cmr,metajack

r? @metajack

10 years agoDon't die in try_unsafe_borrow if tls isn't ready
Alex Crichton [Wed, 25 Sep 2013 07:56:18 +0000 (00:56 -0700)]
Don't die in try_unsafe_borrow if tls isn't ready

If there's no TLS key just yet, then there's nothing to unsafely borrow, so
continue returning None. This prevents causing the runtime to abort itself when
logging before the runtime is fully initialized.

Closes #9487

10 years ago0.8 will be in September
Brian Anderson [Wed, 25 Sep 2013 18:34:08 +0000 (11:34 -0700)]
0.8 will be in September

10 years agoauto merge of #9493 : huonw/rust/move-tuples, r=thestinger
bors [Wed, 25 Sep 2013 18:26:07 +0000 (11:26 -0700)]
auto merge of #9493 : huonw/rust/move-tuples, r=thestinger

The old behaviour of `foo.n0()` is replaced by `foo.n0_ref().clone()`.

10 years agorustpkg: Search for packages correctly when using the rust_path_hack
Tim Chevalier [Tue, 24 Sep 2013 19:10:44 +0000 (12:10 -0700)]
rustpkg: Search for packages correctly when using the rust_path_hack

Previously, any package would match any other package ID when searching
using the rust_path_hack, so long as the directory had one or more crate
files in it. Now, rustpkg checks that the parent directory matches the
package ID.

Closes #9273

10 years agostd: Add an is_parent_of method to Path
Tim Chevalier [Tue, 24 Sep 2013 19:10:36 +0000 (12:10 -0700)]
std: Add an is_parent_of method to Path

10 years agoauto merge of #9428 : alexcrichton/rust/llvm-zlib-and-libffi, r=pnkfelix
bors [Wed, 25 Sep 2013 17:01:00 +0000 (10:01 -0700)]
auto merge of #9428 : alexcrichton/rust/llvm-zlib-and-libffi, r=pnkfelix

This should help bring fewer dependencies in to the snapshots.

Closes #9397

10 years agoauto merge of #9491 : thestinger/rust/noreturn, r=huonw
bors [Wed, 25 Sep 2013 14:25:56 +0000 (07:25 -0700)]
auto merge of #9491 : thestinger/rust/noreturn, r=huonw

Closes #9317

10 years ago#7752: use fcnptr for glob errfunc.
Felix S. Klock II [Wed, 25 Sep 2013 13:50:15 +0000 (15:50 +0200)]
#7752: use fcnptr for glob errfunc.

10 years agoauto merge of #9492 : pnkfelix/rust/fsk-syntax-visit-refactor-remainder, r=huonw
bors [Wed, 25 Sep 2013 13:10:57 +0000 (06:10 -0700)]
auto merge of #9492 : pnkfelix/rust/fsk-syntax-visit-refactor-remainder, r=huonw

r? anyone

Part of #7081.

Removed many unnecessary context arguments, turning them into visitors.  Removed some @allocation.

If this lands, then I think the only thing left that is unaddressed are:
 * the various lint visitors, and
 * middle/privacy.rs, which has `impl<'self> Visitor<&'self method_map> for PrivacyVisitor`

10 years agoauto merge of #9455 : jesseray/rust/master, r=pnkfelix
bors [Wed, 25 Sep 2013 10:55:56 +0000 (03:55 -0700)]
auto merge of #9455 : jesseray/rust/master, r=pnkfelix

In "/src/libstd/char.rs", there are function and method definitions for `is_lowercase()`, `is_uppercase()`, `is_whitespace()`, etc. However, there was no function or method for control characters, so I added the `is_control()` function and method definitions along with documentation and tests. Running `./configure && make check` shows that all tests for `is_control()` pass.

10 years agoauto merge of #9481 : jbclements/rust/minor-cleanup, r=cmr
bors [Wed, 25 Sep 2013 09:15:59 +0000 (02:15 -0700)]
auto merge of #9481 : jbclements/rust/minor-cleanup, r=cmr

Small stuff... might as well get it into the tree. One new test case, some issue # cleanup, remove some unused imports.

10 years agoFold env into CheckItemRecursionVisitor.
Felix S. Klock II [Wed, 25 Sep 2013 09:01:43 +0000 (11:01 +0200)]
Fold env into CheckItemRecursionVisitor.

10 years agoFold ErrorCheckVisitor into Liveness. Removed some @allocation.
Felix S. Klock II [Wed, 25 Sep 2013 09:01:09 +0000 (11:01 +0200)]
Fold ErrorCheckVisitor into Liveness.  Removed some @allocation.

10 years agoFold KindAnalysisVisitor into the Context. Removed unused current_item state.
Felix S. Klock II [Wed, 25 Sep 2013 09:00:36 +0000 (11:00 +0200)]
Fold KindAnalysisVisitor into the Context.  Removed unused current_item state.

10 years agostd: Replace CloneableTuple with Tuple, which takes self by-val.
Huon Wilson [Wed, 25 Sep 2013 09:00:08 +0000 (19:00 +1000)]
std: Replace CloneableTuple with Tuple, which takes self by-val.

The old behaviour of `foo.n0()` is replaced by `foo.n0_ref().clone()`.

10 years agoMove unchanging portions of Context over to the Visitor.
Felix S. Klock II [Wed, 25 Sep 2013 08:59:56 +0000 (10:59 +0200)]
Move unchanging portions of Context over to the Visitor.

10 years agoMove unchanging portions of context over to the Visitor.
Felix S. Klock II [Wed, 25 Sep 2013 08:59:31 +0000 (10:59 +0200)]
Move unchanging portions of context over to the Visitor.

10 years agoFold context into CalleeTranslationVisitor.
Felix S. Klock II [Wed, 25 Sep 2013 08:59:06 +0000 (10:59 +0200)]
Fold context into CalleeTranslationVisitor.

10 years agoFold context into TransItemVisitor.
Felix S. Klock II [Wed, 25 Sep 2013 08:58:40 +0000 (10:58 +0200)]
Fold context into TransItemVisitor.

10 years agoFold type_use.rs Context into its Visitor.
Felix S. Klock II [Wed, 25 Sep 2013 08:55:50 +0000 (10:55 +0200)]
Fold type_use.rs Context into its Visitor.

10 years agoMove the linearly-updated flag state into the Visitor.
Felix S. Klock II [Wed, 25 Sep 2013 08:55:04 +0000 (10:55 +0200)]
Move the linearly-updated flag state into the Visitor.

10 years agoadd `noreturn` attribute to functions returning !
Daniel Micay [Wed, 25 Sep 2013 08:40:45 +0000 (04:40 -0400)]
add `noreturn` attribute to functions returning !

Closes #9317

10 years agoauto merge of #9432 : alexcrichton/rust/correct-item-visibility, r=pcwalton
bors [Wed, 25 Sep 2013 07:55:53 +0000 (00:55 -0700)]
auto merge of #9432 : alexcrichton/rust/correct-item-visibility, r=pcwalton

This fixes private statics and functions from being usable cross-crates, along
with some bad privacy error messages. This is a reopening of #8365 with all the
privacy checks in privacy.rs instead of resolve.rs (where they should be
anyway).

These maps of exported items will hopefully get used for generating
documentation by rustdoc

Closes #8592

10 years agoFix run-pass tests to have 'pub fn main'
Alex Crichton [Wed, 25 Sep 2013 07:43:37 +0000 (00:43 -0700)]
Fix run-pass tests to have 'pub fn main'

This is required by the check-fast target because each test is slurped up into a
submodule.

10 years agoauto merge of #9480 : brson/rust/noexit, r=thestinger
bors [Wed, 25 Sep 2013 06:40:54 +0000 (23:40 -0700)]
auto merge of #9480 : brson/rust/noexit, r=thestinger

This can cause unexpected errors in the runtime when done while
scheduler threads are still initializing. Required some restructuring
of the main_args functions in our libraries.

10 years agoauto merge of #9478 : brson/rust/authors, r=alexcrichton
bors [Wed, 25 Sep 2013 04:40:57 +0000 (21:40 -0700)]
auto merge of #9478 : brson/rust/authors, r=alexcrichton

10 years agoauto merge of #9470 : luqmana/rust/bba, r=brson
bors [Wed, 25 Sep 2013 03:25:58 +0000 (20:25 -0700)]
auto merge of #9470 : luqmana/rust/bba, r=brson

 #8431

~~@brson: do we need to bump up the cratemap version for this change?~~ Tis a no.

10 years agoauto merge of #9335 : alexcrichton/rust/issue-7945, r=thestinger
bors [Wed, 25 Sep 2013 02:06:01 +0000 (19:06 -0700)]
auto merge of #9335 : alexcrichton/rust/issue-7945, r=thestinger

As documented in issue #7945, these literal identifiers are all accepted by rust
today, but they should probably be disallowed (especially `'''`). This changes
all escapable sequences to being *required* to be escaped.

Closes #7945

I wanted to write the tests with more exact spans, but I think #9308 will be fixing that?

10 years agoDisallow char literals which should be escaped
Alex Crichton [Thu, 19 Sep 2013 18:55:03 +0000 (11:55 -0700)]
Disallow char literals which should be escaped

As documented in issue #7945, these literal identifiers are all accepted by rust
today, but they should probably be disallowed (especially `'''`). This changes
all escapable sequences to being *required* to be escaped.

Closes #7945

10 years agoauto merge of #9474 : thestinger/rust/internal, r=alexcrichton
bors [Wed, 25 Sep 2013 00:51:04 +0000 (17:51 -0700)]
auto merge of #9474 : thestinger/rust/internal, r=alexcrichton

the entry point is wrapped with what should be the only public function

10 years agoRemove the annihilate function from the crate map. Fixes #8431
Luqman Aden [Tue, 24 Sep 2013 17:35:42 +0000 (13:35 -0400)]
Remove the annihilate function from the crate map. Fixes #8431

10 years agoDon't use libc::exit. #9473
Brian Anderson [Tue, 24 Sep 2013 23:34:23 +0000 (16:34 -0700)]
Don't use libc::exit. #9473

This can cause unexpected errors in the runtime when done while
scheduler threads are still initializing. Required some restructuring
of the main_args functions in our libraries.

10 years agoUpdate AUTHORS.txt
Brian Anderson [Tue, 24 Sep 2013 23:23:46 +0000 (16:23 -0700)]
Update AUTHORS.txt

10 years agoadded test case for tokenization of macro_rules
John Clements [Tue, 24 Sep 2013 22:57:58 +0000 (15:57 -0700)]
added test case for tokenization of macro_rules

10 years agomark functions internal if not building a library
Daniel Micay [Tue, 24 Sep 2013 22:12:06 +0000 (18:12 -0400)]
mark functions internal if not building a library

the entry point is wrapped with what should be the only public function

10 years agoauto merge of #9336 : alexcrichton/rust/issue-7981, r=catamorphism
bors [Tue, 24 Sep 2013 22:45:57 +0000 (15:45 -0700)]
auto merge of #9336 : alexcrichton/rust/issue-7981, r=catamorphism

Progress on #7981

This doesn't completely close the issue because `struct A;` is still allowed, and it's a much larger change to disallow that. I'm also not entirely sure that we want to disallow that. Regardless, punting that discussion to the issue instead.

10 years agorenumbered due to bug shuffling
John Clements [Tue, 24 Sep 2013 21:48:04 +0000 (14:48 -0700)]
renumbered due to bug shuffling

10 years agoStop accepting 'impl ...;', require {} instead
Alex Crichton [Thu, 19 Sep 2013 19:09:52 +0000 (12:09 -0700)]
Stop accepting 'impl ...;', require {} instead

Progress on #7981

10 years agocleanup
John Clements [Tue, 24 Sep 2013 19:31:24 +0000 (12:31 -0700)]
cleanup

10 years agocomment changes only
John Clements [Tue, 24 Sep 2013 19:02:56 +0000 (12:02 -0700)]
comment changes only

10 years agoauto merge of #9471 : brson/rust/rustexit, r=thestinger
bors [Tue, 24 Sep 2013 18:46:02 +0000 (11:46 -0700)]
auto merge of #9471 : brson/rust/rustexit, r=thestinger

This appears to eliminate the common errors with assertions failures
in rust_initialize_rt_tls_key.

10 years agorust: Don't call libc::exit
Brian Anderson [Tue, 24 Sep 2013 18:40:46 +0000 (11:40 -0700)]
rust: Don't call libc::exit

This appears to eliminate the common errors with assertions failures
in rust_initialize_rt_tls_key.

10 years agoCorrectly encode item visibility in metadata
Alex Crichton [Wed, 7 Aug 2013 07:11:34 +0000 (00:11 -0700)]
Correctly encode item visibility in metadata

This fixes private statics and functions from being usable cross-crates, along
with some bad privacy error messages. This is a reopening of #8365 with all the
privacy checks in privacy.rs instead of resolve.rs (where they should be
anyway).

These maps of exported items will hopefully get used for generating
documentation by rustdoc

Closes #8592

10 years agoauto merge of #9463 : pnkfelix/rust/fsk-syntax-visit-refactor-rest-of-typeck, r=huonw
bors [Tue, 24 Sep 2013 15:26:04 +0000 (08:26 -0700)]
auto merge of #9463 : pnkfelix/rust/fsk-syntax-visit-refactor-rest-of-typeck, r=huonw

r? anyone

Also got rid of a bit of `@mut` allocation.  (Though not the monster that is `@mut FnCtxt`; that case is documented already on #7081; if we attack it, it will probably be its own ticket, not part of #7081.)

10 years agoauto merge of #9462 : SimonSapin/rust/patch-3, r=huonw
bors [Tue, 24 Sep 2013 14:06:09 +0000 (07:06 -0700)]
auto merge of #9462 : SimonSapin/rust/patch-3, r=huonw

10 years agoPart of #7081: Fold remainder of typeck's visit env into their visitor structs.
Felix S. Klock II [Tue, 24 Sep 2013 12:34:51 +0000 (14:34 +0200)]
Part of #7081: Fold remainder of typeck's visit env into their visitor structs.

10 years agoDo not imply that str is sometimes null-terminated.
Simon Sapin [Tue, 24 Sep 2013 12:26:10 +0000 (13:26 +0100)]
Do not imply that str is sometimes null-terminated.

10 years agoauto merge of #9457 : klutzy/rust/doc-fix, r=alexcrichton
bors [Tue, 24 Sep 2013 10:46:00 +0000 (03:46 -0700)]
auto merge of #9457 : klutzy/rust/doc-fix, r=alexcrichton

10 years agoauto merge of #9453 : pnkfelix/rust/fsk-further-syntax-visit-refactors, r=alexcrichton
bors [Tue, 24 Sep 2013 09:26:06 +0000 (02:26 -0700)]
auto merge of #9453 : pnkfelix/rust/fsk-further-syntax-visit-refactors, r=alexcrichton

r? anyone.

Part of #7081.

More refactorings of the syntax::visit::Visitor implementations, folding so-called "environments" into the visitor impl when the latter was previously a trivial unit struct.

As usual, this refactoring only applies when the environments are not actually carrying state that is meant to be pushed and popped as we traverse the expression.  (For an example where the environment *isn't* just passed through, see the `visit_fn` in `liveness.rs`.)

Got rid of a bit of @-allocation in borrowck.

Both cases should be pure-refactorings.

10 years agoauto merge of #9450 : jzelinskie/rust/tutorial-tasks-result-signature, r=alexcrichton
bors [Tue, 24 Sep 2013 08:06:02 +0000 (01:06 -0700)]
auto merge of #9450 : jzelinskie/rust/tutorial-tasks-result-signature, r=alexcrichton

10 years agoauto merge of #9449 : dckc/rust/patch-1, r=alexcrichton
bors [Tue, 24 Sep 2013 06:46:05 +0000 (23:46 -0700)]
auto merge of #9449 : dckc/rust/patch-1, r=alexcrichton

10 years agoauto merge of #9439 : steveklabnik/rust/build_rustpkg_tutorial, r=brson
bors [Tue, 24 Sep 2013 05:26:06 +0000 (22:26 -0700)]
auto merge of #9439 : steveklabnik/rust/build_rustpkg_tutorial, r=brson

Three things in this commit:

1. Actually build the rustpkg tutorial. I didn't know I needed this when
   I first wrote it.
2. Link to it rather than the manual from the
   tutorial.
3. Update the headers: most of them were one level too deeply
   nested.

10 years agostd::local_data: Fix document code
klutzy [Tue, 24 Sep 2013 04:34:48 +0000 (13:34 +0900)]
std::local_data: Fix document code

10 years agoauto merge of #9454 : alexcrichton/rust/snapshot, r=thestinger
bors [Tue, 24 Sep 2013 04:06:03 +0000 (21:06 -0700)]
auto merge of #9454 : alexcrichton/rust/snapshot, r=thestinger

10 years agoRegister new snapshots
Alex Crichton [Tue, 24 Sep 2013 01:13:21 +0000 (18:13 -0700)]
Register new snapshots

10 years agoFix signature of Result in tasks tutorial. Closes #8343
Jimmy Zelinskie [Tue, 24 Sep 2013 02:30:42 +0000 (22:30 -0400)]
Fix signature of Result in tasks tutorial. Closes #8343

10 years agoremove apostrophe where it's is not used as a contraction
Dan Connolly [Tue, 24 Sep 2013 02:28:33 +0000 (21:28 -0500)]
remove apostrophe where it's is not used as a contraction

10 years agoauto merge of #9310 : pcwalton/rust/at-fn, r=pcwalton
bors [Tue, 24 Sep 2013 02:20:58 +0000 (19:20 -0700)]
auto merge of #9310 : pcwalton/rust/at-fn, r=pcwalton

r? @brson

10 years agovisit::Visitor refactor: fold moves.rs VisitContext into ComputeModesVisitor.
Felix S. Klock II [Tue, 24 Sep 2013 01:25:41 +0000 (03:25 +0200)]
visit::Visitor refactor: fold moves.rs VisitContext into ComputeModesVisitor.

10 years agolibrustc: Fix merge fallout.
Patrick Walton [Thu, 19 Sep 2013 01:18:45 +0000 (18:18 -0700)]
librustc: Fix merge fallout.

10 years agotest: Fix rustdoc and tests.
Patrick Walton [Tue, 17 Sep 2013 06:37:54 +0000 (23:37 -0700)]
test: Fix rustdoc and tests.

10 years agolibrusti: Eliminate `@fn`.
Patrick Walton [Wed, 11 Sep 2013 23:26:06 +0000 (16:26 -0700)]
librusti: Eliminate `@fn`.

10 years agolibrustc: Remove `@fn` managed closures from the language.
Patrick Walton [Wed, 11 Sep 2013 01:57:24 +0000 (18:57 -0700)]
librustc: Remove `@fn` managed closures from the language.

10 years agolibsyntax: Introduce routines and remove all `@fn`s from libsyntax save the old visitor
Patrick Walton [Sat, 31 Aug 2013 01:00:38 +0000 (18:00 -0700)]
libsyntax: Introduce routines and remove all `@fn`s from libsyntax save the old visitor

10 years agolibsyntax: Remove some more `@fn`s from the macro expander
Patrick Walton [Fri, 30 Aug 2013 21:40:05 +0000 (14:40 -0700)]
libsyntax: Remove some more `@fn`s from the macro expander

10 years agolibsyntax: Remove some more `@fn` uses
Patrick Walton [Fri, 30 Aug 2013 19:21:45 +0000 (12:21 -0700)]
libsyntax: Remove some more `@fn` uses

10 years agolibrustpkg: Fix diagnostic invocation syntax in librustdoc, librusti, and librustpkg.
Patrick Walton [Fri, 30 Aug 2013 17:55:24 +0000 (10:55 -0700)]
librustpkg: Fix diagnostic invocation syntax in librustdoc, librusti, and librustpkg.

10 years agolibrustc: Change the ID visitor to use traits instead of garbage-collected functions.
Patrick Walton [Fri, 30 Aug 2013 02:01:19 +0000 (19:01 -0700)]
librustc: Change the ID visitor to use traits instead of garbage-collected functions.

10 years agolibrustc: Remove the remaining direct uses of `@fn` from librustc.
Patrick Walton [Fri, 30 Aug 2013 01:34:09 +0000 (18:34 -0700)]
librustc: Remove the remaining direct uses of `@fn` from librustc.