about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-29 00:16:54 +0000
committerbors <bors@rust-lang.org>2020-12-29 00:16:54 +0000
commitd75f48e04d7923b44ec45fec5203a0ca749deb32 (patch)
treebeed754390860bc1b49cbcd0cf50140cf9704c0d /src
parent2987785df3d46d5ff144a5c67fbb8f5cca798d78 (diff)
parente3d26e007c9499f4c6a1f19cefba5006bb10f975 (diff)
downloadrust-d75f48e04d7923b44ec45fec5203a0ca749deb32.tar.gz
rust-d75f48e04d7923b44ec45fec5203a0ca749deb32.zip
Auto merge of #80449 - m-ou-se:rollup-kp2e5n8, r=m-ou-se
Rollup of 11 pull requests

Successful merges:

 - #80383 (clarify wrapping ptr arithmetic docs)
 - #80390 (BTreeMap: rename the area access methods)
 - #80393 (Add links to the source for the rustc and rustdoc books.)
 - #80398 (Use raw version of align_of in rc data_offset)
 - #80402 (Document `InferTy` & co.)
 - #80403 (fix: small typo error in chalk/mod.rs)
 - #80410 (rustdoc book: fix example)
 - #80419 (Add regression test for #80375)
 - #80430 (Add "length" as doc alias to len methods)
 - #80431 (Add "chr" as doc alias to char::from_u32)
 - #80448 (Fix stabilization version of deque_range feature.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/doc/rustc/book.toml3
-rw-r--r--src/doc/rustdoc/book.toml3
-rw-r--r--src/doc/rustdoc/src/what-is-rustdoc.md2
-rw-r--r--src/test/ui/const-generics/issues/issue-80375.rs4
-rw-r--r--src/test/ui/const-generics/issues/issue-80375.stderr11
5 files changed, 22 insertions, 1 deletions
diff --git a/src/doc/rustc/book.toml b/src/doc/rustc/book.toml
index 8adc05c5137..21d127c39c9 100644
--- a/src/doc/rustc/book.toml
+++ b/src/doc/rustc/book.toml
@@ -3,3 +3,6 @@ authors = ["The Rust Project Developers"]
 multilingual = false
 src = "src"
 title = "The rustc book"
+
+[output.html]
+git-repository-url = "https://github.com/rust-lang/rust/tree/master/src/doc/rustc"
diff --git a/src/doc/rustdoc/book.toml b/src/doc/rustdoc/book.toml
index ba30c107667..c2e7ff58906 100644
--- a/src/doc/rustdoc/book.toml
+++ b/src/doc/rustdoc/book.toml
@@ -2,3 +2,6 @@
 authors = ["The Rust Project Developers"]
 src = "src"
 title = "The rustdoc book"
+
+[output.html]
+git-repository-url = "https://github.com/rust-lang/rust/tree/master/src/doc/rustdoc"
diff --git a/src/doc/rustdoc/src/what-is-rustdoc.md b/src/doc/rustdoc/src/what-is-rustdoc.md
index 1f6dced180b..32dc1e02bb3 100644
--- a/src/doc/rustdoc/src/what-is-rustdoc.md
+++ b/src/doc/rustdoc/src/what-is-rustdoc.md
@@ -10,7 +10,7 @@ CSS, and JavaScript.
 Let's give it a try! Create a new project with Cargo:
 
 ```bash
-$ cargo new docs
+$ cargo new docs --lib
 $ cd docs
 ```
 
diff --git a/src/test/ui/const-generics/issues/issue-80375.rs b/src/test/ui/const-generics/issues/issue-80375.rs
new file mode 100644
index 00000000000..c906bb2c4d9
--- /dev/null
+++ b/src/test/ui/const-generics/issues/issue-80375.rs
@@ -0,0 +1,4 @@
+struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
+//~^ ERROR generic parameters may not be used in const operations
+
+fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-80375.stderr b/src/test/ui/const-generics/issues/issue-80375.stderr
new file mode 100644
index 00000000000..9765a639a48
--- /dev/null
+++ b/src/test/ui/const-generics/issues/issue-80375.stderr
@@ -0,0 +1,11 @@
+error: generic parameters may not be used in const operations
+  --> $DIR/issue-80375.rs:1:41
+   |
+LL | struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
+   |                                         ^^^^^ cannot perform const operation using `COUNT`
+   |
+   = help: const parameters may only be used as standalone arguments, i.e. `COUNT`
+   = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
+
+error: aborting due to previous error
+