Skip to content

Commit 1f8703f

Browse files
committed
---
yaml --- r: 121296 b: refs/heads/dist-snap c: 91c7687 h: refs/heads/master v: v3
1 parent b59622a commit 1f8703f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1240
-1792
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 6ca454f12c13cd34ca41741d372485e34f79706a
9+
refs/heads/dist-snap: 91c7687f03fd01c61fc7594e6ff8f3cc0f6363a4
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/etc/emacs/run_rust_emacs_tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/bin/sh
21
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
32
# file at the top-level directory of this distribution and at
43
# http://rust-lang.org/COPYRIGHT.

branches/dist-snap/src/etc/emacs/rust-mode-tests.el

Lines changed: 29 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
(defun rust-test-explain-bad-manip (original point-pos manip-func expected got)
1313
(if (equal expected got)
1414
nil
15-
(list
15+
(list
1616
;; The (goto-char) and (insert) business here is just for
1717
;; convenience--after an error, you can copy-paste that into emacs eval to
1818
;; insert the bare strings into a buffer
@@ -66,13 +66,13 @@ Also, the result should be the same regardless of whether the code is at the beg
6666
do (rust-test-manip-code
6767
(concat padding-beginning unfilled padding-end)
6868
pos
69-
(lambda ()
69+
(lambda ()
7070
(let ((fill-column rust-test-fill-column))
7171
(fill-paragraph)))
7272
(concat padding-beginning expected padding-end)))))))
7373

7474
(ert-deftest fill-paragraph-top-level-multi-line-style-doc-comment-second-line ()
75-
(test-fill-paragraph
75+
(test-fill-paragraph
7676
"/**
7777
* This is a very very very very very very very long string
7878
*/"
@@ -188,10 +188,10 @@ This is some more text. Fee fie fo fum. Humpty dumpty sat on a wall.
188188

189189
(ert-deftest fill-paragraph-with-no-space-after-star-prefix ()
190190
(test-fill-paragraph
191-
"/**
191+
"/**
192192
*This is a very very very very very very very long string
193193
*/"
194-
"/**
194+
"/**
195195
*This is a very very very very
196196
*very very very long string
197197
*/"))
@@ -226,7 +226,7 @@ fn bar() { }"
226226
fn bar() { }" 14 67))
227227

228228
(defun test-auto-fill (initial position inserted expected)
229-
(rust-test-manip-code
229+
(rust-test-manip-code
230230
initial
231231
position
232232
(lambda ()
@@ -244,7 +244,7 @@ fn bar() { }" 14 67))
244244
(ert-deftest auto-fill-multi-line-doc-comment ()
245245
(test-auto-fill
246246
"/**
247-
*
247+
*
248248
*/"
249249
8
250250
"This is a very very very very very very very long string"
@@ -301,7 +301,7 @@ struct Foo { bar: int,
301301
302302
struct Blah {x:int,
303303
y:int,
304-
z:String"))
304+
z:~str}"))
305305

306306
(ert-deftest indent-doc-comments ()
307307
(test-indent
@@ -317,7 +317,7 @@ fn foo() {
317317
/*!
318318
* this is a nested doc comment
319319
*/
320-
320+
321321
//! And so is this
322322
}"))
323323

@@ -331,7 +331,7 @@ struct foo {
331331
b:char
332332
}
333333
334-
fn bar(x:Box<int>) { // comment here should not affect the next indent
334+
fn bar(x:~int) { // comment here should not affect the next indent
335335
bla();
336336
bla();
337337
}"))
@@ -387,7 +387,7 @@ fn baz( a:int, // shoudl work with a comment here
387387
"
388388
fn args_on_the_next_line( // with a comment
389389
a:int,
390-
b:String) {
390+
b:~str) {
391391
let aaaaaa = [
392392
1,
393393
2,
@@ -456,7 +456,7 @@ fn foo() {
456456
(test-indent
457457
"
458458
fn foo() {
459-
let x =
459+
let x =
460460
match blah {
461461
Pattern |
462462
Pattern2 => {
@@ -473,7 +473,7 @@ fn foo() {
473473
(test-indent
474474
"
475475
fn foo() {
476-
let x =
476+
let x =
477477
foo(bar(|x| {
478478
only_one_indent_here();
479479
}));
@@ -572,7 +572,7 @@ fn indenting_middle_of_line() {
572572
}
573573
574574
fn indented_already() {
575-
575+
576576
// The previous line already has its spaces
577577
}
578578
"
@@ -654,91 +654,91 @@ All positions are position symbols found in `rust-test-positions-alist'."
654654
(rust-get-buffer-pos reg-end))))))
655655

656656
(ert-deftest rust-beginning-of-defun-from-middle-of-fn ()
657-
(rust-test-motion
657+
(rust-test-motion
658658
rust-test-motion-string
659659
'middle-of-fn1
660660
'start-of-fn1
661661
#'beginning-of-defun))
662662

663663
(ert-deftest rust-beginning-of-defun-from-end ()
664-
(rust-test-motion
664+
(rust-test-motion
665665
rust-test-motion-string
666666
'end-of-fn1
667667
'start-of-fn1
668668
#'beginning-of-defun))
669669

670670
(ert-deftest rust-beginning-of-defun-before-open-brace ()
671-
(rust-test-motion
671+
(rust-test-motion
672672
rust-test-motion-string
673673
'start-of-fn1-middle-of-line
674674
'start-of-fn1
675675
#'beginning-of-defun))
676676

677677
(ert-deftest rust-beginning-of-defun-between-fns ()
678-
(rust-test-motion
678+
(rust-test-motion
679679
rust-test-motion-string
680680
'between-fn1-fn2
681681
'start-of-fn1
682682
#'beginning-of-defun))
683683

684684
(ert-deftest rust-beginning-of-defun-with-arg ()
685-
(rust-test-motion
685+
(rust-test-motion
686686
rust-test-motion-string
687687
'middle-of-fn2
688688
'start-of-fn1
689689
#'beginning-of-defun 2))
690690

691691
(ert-deftest rust-beginning-of-defun-with-negative-arg ()
692-
(rust-test-motion
692+
(rust-test-motion
693693
rust-test-motion-string
694694
'middle-of-fn1
695695
'beginning-of-fn3
696696
#'beginning-of-defun -2))
697697

698698
(ert-deftest rust-beginning-of-defun-pub-fn ()
699-
(rust-test-motion
699+
(rust-test-motion
700700
rust-test-motion-string
701701
'middle-of-fn3
702702
'beginning-of-fn3
703703
#'beginning-of-defun))
704704

705705
(ert-deftest rust-end-of-defun-from-middle-of-fn ()
706-
(rust-test-motion
706+
(rust-test-motion
707707
rust-test-motion-string
708708
'middle-of-fn1
709709
'between-fn1-fn2
710710
#'end-of-defun))
711711

712712
(ert-deftest rust-end-of-defun-from-beg ()
713-
(rust-test-motion
713+
(rust-test-motion
714714
rust-test-motion-string
715715
'start-of-fn1
716716
'between-fn1-fn2
717717
#'end-of-defun))
718718

719719
(ert-deftest rust-end-of-defun-before-open-brace ()
720-
(rust-test-motion
720+
(rust-test-motion
721721
rust-test-motion-string
722722
'start-of-fn1-middle-of-line
723723
'between-fn1-fn2
724724
#'end-of-defun))
725725

726726
(ert-deftest rust-end-of-defun-between-fns ()
727-
(rust-test-motion
727+
(rust-test-motion
728728
rust-test-motion-string
729729
'between-fn1-fn2
730730
'after-end-of-fn2
731731
#'end-of-defun))
732732

733733
(ert-deftest rust-end-of-defun-with-arg ()
734-
(rust-test-motion
734+
(rust-test-motion
735735
rust-test-motion-string
736736
'middle-of-fn1
737737
'after-end-of-fn2
738738
#'end-of-defun 2))
739739

740740
(ert-deftest rust-end-of-defun-with-negative-arg ()
741-
(rust-test-motion
741+
(rust-test-motion
742742
rust-test-motion-string
743743
'middle-of-fn3
744744
'between-fn1-fn2
@@ -752,14 +752,14 @@ All positions are position symbols found in `rust-test-positions-alist'."
752752
#'mark-defun))
753753

754754
(ert-deftest rust-mark-defun-from-end ()
755-
(rust-test-region
755+
(rust-test-region
756756
rust-test-region-string
757757
'end-of-fn1
758758
'before-start-of-fn1 'between-fn1-fn2
759759
#'mark-defun))
760760

761761
(ert-deftest rust-mark-defun-start-of-defun ()
762-
(rust-test-region
762+
(rust-test-region
763763
rust-test-region-string
764764
'start-of-fn2
765765
'between-fn1-fn2 'after-end-of-fn2
@@ -834,63 +834,3 @@ All positions are position symbols found in `rust-test-positions-alist'."
834834
'nonblank-line-indented-already-middle-start
835835
'nonblank-line-indented-already-middle-target
836836
#'indent-for-tab-command))
837-
838-
(defun rust-test-fontify-string (str)
839-
(with-temp-buffer
840-
(rust-mode)
841-
(insert str)
842-
(font-lock-fontify-buffer)
843-
(buffer-string)))
844-
845-
(defun rust-test-group-str-by-face (str)
846-
"Fontify `STR' in rust-mode and group it by face, returning a
847-
list of substrings of `STR' each followed by its face."
848-
(cl-loop with fontified = (rust-test-fontify-string str)
849-
for start = 0 then end
850-
while start
851-
for end = (next-single-property-change start 'face fontified)
852-
for prop = (get-text-property start 'face fontified)
853-
for text = (substring-no-properties fontified start end)
854-
if prop
855-
append (list text prop)))
856-
857-
(defun rust-test-font-lock (source face-groups)
858-
"Test that `SOURCE' fontifies to the expected `FACE-GROUPS'"
859-
(should (equal (rust-test-group-str-by-face source)
860-
face-groups)))
861-
862-
(ert-deftest font-lock-attribute-simple ()
863-
(rust-test-font-lock
864-
"#[foo]"
865-
'("#[foo]" font-lock-preprocessor-face)))
866-
867-
(ert-deftest font-lock-attribute-inner ()
868-
(rust-test-font-lock
869-
"#![foo]"
870-
'("#![foo]" font-lock-preprocessor-face)))
871-
872-
(ert-deftest font-lock-attribute-key-value ()
873-
(rust-test-font-lock
874-
"#[foo = \"bar\"]"
875-
'("#[foo = " font-lock-preprocessor-face
876-
"\"bar\"" font-lock-string-face
877-
"]" font-lock-preprocessor-face)))
878-
879-
(ert-deftest font-lock-attribute-around-comment ()
880-
(rust-test-font-lock
881-
"#[foo /* bar */]"
882-
'("#[foo " font-lock-preprocessor-face
883-
"/* " font-lock-comment-delimiter-face
884-
"bar */" font-lock-comment-face
885-
"]" font-lock-preprocessor-face)))
886-
887-
(ert-deftest font-lock-attribute-inside-string ()
888-
(rust-test-font-lock
889-
"\"#[foo]\""
890-
'("\"#[foo]\"" font-lock-string-face)))
891-
892-
(ert-deftest font-lock-attribute-inside-comment ()
893-
(rust-test-font-lock
894-
"/* #[foo] */"
895-
'("/* " font-lock-comment-delimiter-face
896-
"#[foo] */" font-lock-comment-face)))

branches/dist-snap/src/etc/emacs/rust-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214

215215
;; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]`
216216
(,(rust-re-grab (concat "#\\!?\\[" rust-re-ident "[^]]*\\]"))
217-
1 font-lock-preprocessor-face keep)
217+
1 font-lock-preprocessor-face t)
218218

219219
;; Syntax extension invocations like `foo!`, highlight including the !
220220
(,(concat (rust-re-grab (concat rust-re-ident "!")) "[({[:space:][]")

branches/dist-snap/src/liballoc/owned.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ use core::result::{Ok, Err, Result};
2525
///
2626
/// The following two examples are equivalent:
2727
///
28-
/// use std::owned::HEAP;
29-
///
30-
/// # struct Bar;
31-
/// # impl Bar { fn new(_a: int) { } }
32-
/// let foo = box(HEAP) Bar::new(2);
33-
/// let foo = box Bar::new(2);
28+
/// let foo = box(HEAP) Bar::new(...);
29+
/// let foo = box Bar::new(...);
3430
#[lang="exchange_heap"]
3531
pub static HEAP: () = ();
3632

branches/dist-snap/src/libcore/failure.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
//! useful an upstream crate must define failure for libcore to use. The current
1616
//! interface for failure is:
1717
//!
18-
//! ```ignore
19-
//! fn begin_unwind(fmt: &fmt::Arguments, file: &str, line: uint) -> !;
20-
//! ```
18+
//! fn begin_unwind(fmt: &fmt::Arguments, file: &str, line: uint) -> !;
2119
//!
2220
//! This definition allows for failing with any general message, but it does not
2321
//! allow for failing with a `~Any` value. The reason for this is that libcore

branches/dist-snap/src/libgreen/stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn protect_last_page(stack: &MemoryMap) -> bool {
9696
// This may seem backwards: the start of the segment is the last page?
9797
// Yes! The stack grows from higher addresses (the end of the allocated
9898
// block) to lower addresses (the start of the allocated block).
99-
let last_page = stack.data as *mut libc::c_void;
99+
let last_page = stack.data as *libc::c_void;
100100
libc::mprotect(last_page, page_size() as libc::size_t,
101101
libc::PROT_NONE) != -1
102102
}

0 commit comments

Comments
 (0)