about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/unnecessary_literal_bound.stderr
blob: e510d86622d63d85bdabfdd58c4cfefe6c3ef569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error: returning a `str` unnecessarily tied to the lifetime of arguments
  --> tests/ui/unnecessary_literal_bound.rs:9:30
   |
LL |     fn returns_lit(&self) -> &str {
   |                              ^^^^ help: try: `&'static str`
   |
   = note: `-D clippy::unnecessary-literal-bound` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_literal_bound)]`

error: returning a `str` unnecessarily tied to the lifetime of arguments
  --> tests/ui/unnecessary_literal_bound.rs:30:68
   |
LL |     fn contionally_returns_literals_explicit(&self, cond: bool) -> &str {
   |                                                                    ^^^^ help: try: `&'static str`

error: returning a `str` unnecessarily tied to the lifetime of arguments
  --> tests/ui/unnecessary_literal_bound.rs:55:31
   |
LL |     fn trait_method(&self) -> &str {
   |                               ^^^^ help: try: `&'static str`

error: aborting due to 3 previous errors