File: consider-restricting.rs

package info (click to toggle)
rust-async-trait 0.1.83-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (34)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// https://github.com/rust-lang/rust/issues/93828

use async_trait::async_trait;

pub trait IntoUrl {}

#[async_trait]
pub trait ClientExt {
    async fn publish<T: IntoUrl>(&self, url: T);
}

struct Client;

#[async_trait]
impl ClientExt for Client {
    async fn publish<T: IntoUrl>(&self, url: T) {}
}

struct Client2;

#[async_trait]
impl ClientExt for Client2 {
    async fn publish<T>(&self, url: T) {}
}

fn main() {}