Ensure that --generate-link-to-definition is only used with HTML output and is unstable

This commit is contained in:
Guillaume Gomez 2021-05-04 11:51:11 +02:00 committed by Guillaume Gomez
parent 2104bf27d4
commit 83dcd30ee0
7 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,6 @@
// This test purpose is to check that the "--generate-link-to-definition"
// option can only be used on nightly.
// compile-flags: --generate-link-to-definition
pub fn f() {}

View file

@ -0,0 +1,2 @@
error: the `-Z unstable-options` flag must also be passed to enable the flag `generate-link-to-definition`

View file

@ -0,0 +1,6 @@
// This test purpose is to check that the "--generate-link-to-definition"
// option can only be used with HTML generation.
// compile-flags: -Zunstable-options --generate-link-to-definition --output-format json
pub fn f() {}

View file

@ -0,0 +1,2 @@
error: --generate-link-to-definition option can only be used with HTML output format

View file

@ -0,0 +1,6 @@
// This test purpose is to check that the "--generate-link-to-definition"
// option can only be used with HTML generation.
// compile-flags: -Zunstable-options --generate-link-to-definition --show-coverage
pub fn f() {}

View file

@ -0,0 +1,2 @@
error: --generate-link-to-definition option can only be used with HTML output format