Skip to content

Commit 73b00ca

Browse files
committed
Document assign-assign.rs
1 parent 728f2da commit 73b00ca

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/ui/assign-assign.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
//! Regression test for [Using the result of an assignment expression results in an LLVM assert
2+
//! #483][issue-483]. This test checks that assignment expressions produce a unit type, and is
3+
//! properly lowered to LLVM IR such that it does not trigger an LLVM assertion. This test was added
4+
//! *really* early, back in 2011.
5+
//!
6+
//! [issue-483]: https://github.com/rust-lang/rust/issues/483
7+
18
//@ run-pass
2-
// Issue 483 - Assignment expressions result in nil
39

410
fn test_assign() {
511
let mut x: isize;
@@ -27,4 +33,7 @@ fn test_assign_op() {
2733
assert_eq!(z, ());
2834
}
2935

30-
pub fn main() { test_assign(); test_assign_op(); }
36+
pub fn main() {
37+
test_assign();
38+
test_assign_op();
39+
}

0 commit comments

Comments
 (0)